diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-07-26 21:54:32 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-07-26 21:54:32 +0000 |
commit | 26d8ac70f566a4a43579929cd96174618b3b9949 (patch) | |
tree | 47b954945d8419c9355f5b7220533c7331c694dd | |
parent | 211d24938fdfadae7e8c9b152bdf936dc4b82249 (diff) |
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])
-rw-r--r-- | bin/bbackupd/BackupClientContext.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
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(...) |