summaryrefslogtreecommitdiff
path: root/lib/backupstore
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-02-07 19:54:26 +0000
committerChris Wilson <chris+github@qwirx.com>2014-02-07 19:54:26 +0000
commit92f370e3f4e8b818e121d2a67b38e628cded85c1 (patch)
tree9b253d407e0db75908b743007576e6939cc5f518 /lib/backupstore
parentae8c511c9cfd2a12e9e4c1199b080a2dfda22973 (diff)
Add ReleaseWriteLock to BackupStoreContext.
Not really an API, but useful for BackupProtocolLocal2.
Diffstat (limited to 'lib/backupstore')
-rw-r--r--lib/backupstore/BackupStoreContext.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/backupstore/BackupStoreContext.h b/lib/backupstore/BackupStoreContext.h
index c33e7d50..c411d5f5 100644
--- a/lib/backupstore/BackupStoreContext.h
+++ b/lib/backupstore/BackupStoreContext.h
@@ -86,6 +86,15 @@ public:
bool AttemptToGetWriteLock();
void SetClientHasAccount(const std::string &rStoreRoot, int StoreDiscSet) {mClientHasAccount = true; mStoreRoot = rStoreRoot; mStoreDiscSet = StoreDiscSet;}
+ // Not really an API, but useful for BackupProtocolLocal2.
+ void ReleaseWriteLock()
+ {
+ if(mWriteLock.GotLock())
+ {
+ mWriteLock.ReleaseLock();
+ }
+ }
+
bool GetClientHasAccount() const {return mClientHasAccount;}
const std::string &GetStoreRoot() const {return mStoreRoot;}
int GetStoreDiscSet() const {return mStoreDiscSet;}