Patch level : 10.0

Files correlati     : ba0.exe
Ricompilazione Demo : [ ]
Commento            :
Migliorato test su dninst.zip per client in Terminal Server


git-svn-id: svn://10.65.10.50/branches/R_10_00@21639 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2011-02-14 14:32:22 +00:00
parent 77d040d613
commit 4913270804

@ -1479,19 +1479,22 @@ bool TMenu_application::dongle_update_needed() const
{
bool ok = TApplication::test_assistance_year();
if (ok)
{
if (ini_get_int(CONFIG_INSTALL, "Main", "Type") == 3) // postazione client
// Se sono una postazione client verifico l'aggiornamento di dninst.zip
if (xvt_sys_get_session_id() <= 0 && ini_get_int(CONFIG_INSTALL, "Main", "Type") == 3)
{
// Controlla se deve aggiornare il dninst.zip locale da quello del server
const TFilename local_name = "setup/dninst.zip";
const char* const local_name = "setup/dninst.zip";
TFilename remote_name = ini_get_string(CONFIG_GENERAL, "Main", "DiskPath");
remote_name.add(local_name);
const long remote_date = xvt_fsys_file_attr(remote_name, XVT_FILE_ATTR_MTIME);
const long local_date = xvt_fsys_file_attr(local_name, XVT_FILE_ATTR_MTIME);
if (remote_date > local_date)
::fcopy(remote_name, local_name);
if (remote_name.exist())
{
const long remote_date = xvt_fsys_file_attr(remote_name, XVT_FILE_ATTR_MTIME);
const long local_date = xvt_fsys_file_attr(local_name, XVT_FILE_ATTR_MTIME);
if (remote_date > local_date)
::fcopy(remote_name, local_name);
}
}
Tdninst dninst; // file aggiornatissimo ormai ...
const int dninst_year = dninst.assist_year();