From 26d8ac70f566a4a43579929cd96174618b3b9949 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 26 Jul 2007 21:54:32 +0000 Subject: Apply Gary's patch from ticket #19 to respect the server's hard limit rather than the soft limit. This allows setting the soft limit to zero, so that housekeeping will remove all old versions of all files. (refs #19, refs #3, merges [1659]) --- bin/bbackupd/BackupClientContext.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/bbackupd/BackupClientContext.cpp b/bin/bbackupd/BackupClientContext.cpp index c18bcfd6..18859393 100644 --- a/bin/bbackupd/BackupClientContext.cpp +++ b/bin/bbackupd/BackupClientContext.cpp @@ -197,16 +197,12 @@ BackupProtocolClient &BackupClientContext::GetConnection() ::syslog(LOG_INFO, "Connection made, login successful"); // Check to see if there is any space available on the server - int64_t softLimit = loginConf->GetBlocksSoftLimit(); - int64_t hardLimit = loginConf->GetBlocksHardLimit(); - // Threshold for uploading new stuff - int64_t stopUploadThreshold = softLimit + ((hardLimit - softLimit) / 3); - if(loginConf->GetBlocksUsed() > stopUploadThreshold) + if(loginConf->GetBlocksUsed() >= loginConf->GetBlocksHardLimit()) { // no -- flag so only things like deletions happen mStorageLimitExceeded = true; // Log - ::syslog(LOG_WARNING, "Exceeded storage limits on server -- not uploading changes to files"); + ::syslog(LOG_WARNING, "Exceeded storage hard-limit on server -- not uploading changes to files"); } } catch(...) -- cgit v1.2.3