Update capabilities after client update

This commit is contained in:
Martin 2014-10-25 18:38:39 +02:00
parent 11cd5be490
commit dcb54251ef
2 changed files with 11 additions and 1 deletions

View File

@ -90,7 +90,7 @@ BackupServerGet::BackupServerGet(IPipe *pPipe, sockaddr_in pAddr, const std::wst
: internet_connection(internet_connection), server_settings(NULL), client_throttler(NULL),
use_snapshots(use_snapshots), use_reflink(use_reflink), local_hash(NULL), bsh(NULL),
bsh_ticket(ILLEGAL_THREADPOOL_TICKET), bsh_prepare(NULL), bsh_prepare_ticket(ILLEGAL_THREADPOOL_TICKET),
backup_dao(NULL)
backup_dao(NULL), client_updated_time(0)
{
q_update_lastseen=NULL;
pipe=pPipe;
@ -556,6 +556,12 @@ void BackupServerGet::operator ()(void)
}
}
if(client_updated_time!=0 && Server->getTimeSeconds()-client_updated_time>5*60)
{
updateCapabilities();
client_updated_time=0;
}
update_sql_intervals(true);
int64 ttime=Server->getTimeMS();
@ -4313,6 +4319,8 @@ void BackupServerGet::checkClientVersion(void)
Server->destroy(cc);
client_updated_time = Server->getTimeSeconds();
if(ok)
{
ServerLogger::Log(clientid, L"Updated client successfully", LL_INFO);

View File

@ -318,4 +318,6 @@ private:
IMutex* hash_existing_mutex;
std::vector<ServerBackupDao::SFileEntry> hash_existing;
int64 client_updated_time;
};