summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/bbackupd/BackupClientDirectoryRecord.cpp9
-rw-r--r--bin/bbackupd/BackupDaemon.h7
-rw-r--r--bin/bbackupd/BackupDaemonInterface.h3
3 files changed, 13 insertions, 6 deletions
diff --git a/bin/bbackupd/BackupClientDirectoryRecord.cpp b/bin/bbackupd/BackupClientDirectoryRecord.cpp
index 58cf0ebb..fb43d7ce 100644
--- a/bin/bbackupd/BackupClientDirectoryRecord.cpp
+++ b/bin/bbackupd/BackupClientDirectoryRecord.cpp
@@ -1745,8 +1745,6 @@ int64_t BackupClientDirectoryRecord::UploadFile(
if(diffFromID != 0)
{
// Found an old version
- rNotifier.NotifyFileUploadingPatch(this,
- rNonVssFilePath);
// Get the index
std::auto_ptr<IOStream> blockIndexStream(connection.ReceiveStream());
@@ -1778,7 +1776,12 @@ int64_t BackupClientDirectoryRecord::UploadFile(
}
}
- if(!apStreamToUpload.get()) // No patch upload, so do a normal upload
+ if(apStreamToUpload.get())
+ {
+ rNotifier.NotifyFileUploadingPatch(this, rNonVssFilePath,
+ apStreamToUpload->GetBytesToUpload());
+ }
+ else // No patch upload, so do a normal upload
{
// below threshold or nothing to diff from, so upload whole
rNotifier.NotifyFileUploading(this, rNonVssFilePath);
diff --git a/bin/bbackupd/BackupDaemon.h b/bin/bbackupd/BackupDaemon.h
index 649f00cc..f398e949 100644
--- a/bin/bbackupd/BackupDaemon.h
+++ b/bin/bbackupd/BackupDaemon.h
@@ -403,11 +403,14 @@ public:
}
virtual void NotifyFileUploadingPatch(
const BackupClientDirectoryRecord* pDirRecord,
- const std::string& rLocalPath)
+ const std::string& rLocalPath,
+ int64_t EstimatedBytesToUpload)
{
if (mLogAllFileAccess)
{
- BOX_NOTICE("Uploading patch to file: " << rLocalPath);
+ BOX_NOTICE("Uploading patch to file: " << rLocalPath <<
+ ", estimated upload size = " <<
+ EstimatedBytesToUpload);
}
}
virtual void NotifyFileUploadingAttributes(
diff --git a/bin/bbackupd/BackupDaemonInterface.h b/bin/bbackupd/BackupDaemonInterface.h
index 2e603b96..eac96d25 100644
--- a/bin/bbackupd/BackupDaemonInterface.h
+++ b/bin/bbackupd/BackupDaemonInterface.h
@@ -116,7 +116,8 @@ class ProgressNotifier
const std::string& rLocalPath) = 0;
virtual void NotifyFileUploadingPatch(
const BackupClientDirectoryRecord* pDirRecord,
- const std::string& rLocalPath) = 0;
+ const std::string& rLocalPath,
+ int64_t EstimatedBytesToUpload) = 0;
virtual void NotifyFileUploadingAttributes(
const BackupClientDirectoryRecord* pDirRecord,
const std::string& rLocalPath) = 0;