diff options
author | Chris Wilson <chris+github@qwirx.com> | 2015-05-06 21:29:39 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2015-05-06 21:29:39 +0000 |
commit | 41b716a473e2efae0993a0dc323cd786c329ff7a (patch) | |
tree | 9df7107d27deb5a3690f83be3d91454334f4e071 /lib/backupstore/BackupStoreAccounts.h | |
parent | cd0ff15b1941f997faa500962b0bfc1581501010 (diff) |
Fix missing account lock while checking for errors.
The old assertion, that the write lock file exists before starting checking,
was erroneously passing before when no lock was held, because the lockfile
was never deleted. Now that we delete it when unlocking the account, this
started causing test failures.
Changed the way that accounts are checked for errors to use a function that
acquires a write lock first, and modified test to disconnect open clients
before starting checking the account, to fix it.
Diffstat (limited to 'lib/backupstore/BackupStoreAccounts.h')
-rw-r--r-- | lib/backupstore/BackupStoreAccounts.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/backupstore/BackupStoreAccounts.h b/lib/backupstore/BackupStoreAccounts.h index 5ee67312..3c2e4210 100644 --- a/lib/backupstore/BackupStoreAccounts.h +++ b/lib/backupstore/BackupStoreAccounts.h @@ -76,7 +76,8 @@ public: int PrintAccountInfo(int32_t ID); int SetAccountEnabled(int32_t ID, bool enabled); int DeleteAccount(int32_t ID, bool AskForConfirmation); - int CheckAccount(int32_t ID, bool FixErrors, bool Quiet); + int CheckAccount(int32_t ID, bool FixErrors, bool Quiet, + bool ReturnNumErrorsFound = false); int CreateAccount(int32_t ID, int32_t DiscNumber, int32_t SoftLimit, int32_t HardLimit); int HousekeepAccountNow(int32_t ID); |