diff options
author | Chris Wilson <chris+github@qwirx.com> | 2012-04-28 18:19:53 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2012-04-28 18:19:53 +0000 |
commit | 009c4414728e376c9bf3557ef0b4db9aa251d39b (patch) | |
tree | 2056c11c23c98df122c0c64d8fccb51ee5daab09 /bin/bbackupd/BackupDaemon.cpp | |
parent | 7b5f339fa350511457d84273dc2b122b161a8811 (diff) |
Allow BackupDaemon user to reset state for testing.
Diffstat (limited to 'bin/bbackupd/BackupDaemon.cpp')
-rw-r--r-- | bin/bbackupd/BackupDaemon.cpp | 17 |
1 files changed, 11 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, |