summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/bbackupd/BackupDaemon.cpp17
-rw-r--r--bin/bbackupd/BackupDaemon.h1
2 files changed, 12 insertions, 6 deletions
diff --git a/bin/bbackupd/BackupDaemon.cpp b/bin/bbackupd/BackupDaemon.cpp
index a1560072..3b920d37 100644
--- a/bin/bbackupd/BackupDaemon.cpp
+++ b/bin/bbackupd/BackupDaemon.cpp
@@ -721,12 +721,7 @@ void BackupDaemon::RunSyncNowWithExceptionHandling()
DeleteCorruptBerkelyDbFiles();
}
- // Clear state data
- // Go back to beginning of time
- mLastSyncTime = 0;
- mClientStoreMarker = BackupClientContext::ClientStoreMarker_NotKnown; // no store marker, so download everything
- DeleteAllLocations();
- DeleteAllIDMaps();
+ ResetCachedState();
// Handle restart?
if(StopRun())
@@ -789,6 +784,16 @@ void BackupDaemon::RunSyncNowWithExceptionHandling()
OnBackupFinish();
}
+void BackupDaemon::ResetCachedState()
+{
+ // Clear state data
+ // Go back to beginning of time
+ mLastSyncTime = 0;
+ mClientStoreMarker = BackupClientContext::ClientStoreMarker_NotKnown; // no store marker, so download everything
+ DeleteAllLocations();
+ DeleteAllIDMaps();
+}
+
void BackupDaemon::RunSyncNow()
{
// Delete the serialised store object file,
diff --git a/bin/bbackupd/BackupDaemon.h b/bin/bbackupd/BackupDaemon.h
index d6b00371..1d3c991e 100644
--- a/bin/bbackupd/BackupDaemon.h
+++ b/bin/bbackupd/BackupDaemon.h
@@ -117,6 +117,7 @@ public:
void InitCrypto();
void RunSyncNowWithExceptionHandling();
void RunSyncNow();
+ void ResetCachedState();
void OnBackupStart();
void OnBackupFinish();
// TouchFileInWorkingDir is only here for use by Boxi.