diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-09-01 13:26:31 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-09-01 13:26:31 +0000 |
commit | 0199687f46d3c51df525feb4fe82bcf42eb4f8d3 (patch) | |
tree | dfe564d5c51557f91dbf2713c7aaf98de8baed95 /bin/bbackupd/BackupClientDirectoryRecord.cpp | |
parent | bc121daa5ce85a575ba0158a923077b068d5dd24 (diff) |
Log more detailed errors when the server returns an error while uploading
a file. (merges [1781])
Diffstat (limited to 'bin/bbackupd/BackupClientDirectoryRecord.cpp')
-rw-r--r-- | bin/bbackupd/BackupClientDirectoryRecord.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/bin/bbackupd/BackupClientDirectoryRecord.cpp b/bin/bbackupd/BackupClientDirectoryRecord.cpp index 8cc7e78e..df62c59c 100644 --- a/bin/bbackupd/BackupClientDirectoryRecord.cpp +++ b/bin/bbackupd/BackupClientDirectoryRecord.cpp @@ -887,9 +887,7 @@ bool BackupClientDirectoryRecord::UpdateItems(BackupClientDirectoryRecord::SyncP { // Connection errors should just be passed on to the main handler, retries // would probably just cause more problems. - rParams.GetProgressNotifier() - .NotifyFileUploadException( - this, filename, e); + // Already logged by UploadFile throw; } catch(BoxException &e) @@ -1386,12 +1384,17 @@ int64_t BackupClientDirectoryRecord::UploadFile(BackupClientDirectoryRecord::Syn { // Check and see what error the protocol has -- as it might be an error... int type, subtype; - if(connection.GetLastError(type, subtype) - && type == BackupProtocolClientError::ErrorType - && subtype == BackupProtocolClientError::Err_StorageLimitExceeded) + if(connection.GetLastError(type, subtype)) { - // The hard limit was exceeded on the server, notify! - rParams.mrDaemon.NotifySysadmin(BackupDaemon::NotifyEvent_StoreFull); + if(type == BackupProtocolClientError::ErrorType + && subtype == BackupProtocolClientError::Err_StorageLimitExceeded) + { + // The hard limit was exceeded on the server, notify! + rParams.mrDaemon.NotifySysadmin(BackupDaemon::NotifyEvent_StoreFull); + } + rParams.GetProgressNotifier() + .NotifyFileUploadServerError( + this, rFilename, type, subtype); } } |