summaryrefslogtreecommitdiff
path: root/bin/bbstored
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2012-11-17 19:59:51 +0000
committerChris Wilson <chris+github@qwirx.com>2012-11-17 19:59:51 +0000
commit69147089fa278f1225ae5fb29c87a59009dcc900 (patch)
treeaecf170d7af6acaf909b161b094dc8bf023b48b9 /bin/bbstored
parent1098297e0acfb37715336f1bbd8cfe548a6e038e (diff)
Fix duplicate tagging of housekeeping messages.
Diffstat (limited to 'bin/bbstored')
-rw-r--r--bin/bbstored/BBStoreDHousekeeping.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/bin/bbstored/BBStoreDHousekeeping.cpp b/bin/bbstored/BBStoreDHousekeeping.cpp
index d0f83aed..96fa7c80 100644
--- a/bin/bbstored/BBStoreDHousekeeping.cpp
+++ b/bin/bbstored/BBStoreDHousekeeping.cpp
@@ -100,15 +100,23 @@ void BackupStoreDaemon::RunHousekeepingIfNeeded()
{
try
{
- // Tag log output to identify account
- std::ostringstream tag;
- tag << "hk/" << BOX_FORMAT_ACCOUNT(*i);
- Logging::Tagger tagWithClientID(tag.str());
-
- // Get the account root
std::string rootDir;
int discSet = 0;
- mpAccounts->GetAccountRoot(*i, rootDir, discSet);
+
+ {
+ // Tag log output to identify account
+ std::ostringstream tag;
+ tag << "hk/" << BOX_FORMAT_ACCOUNT(*i);
+ Logging::Tagger tagWithClientID(tag.str());
+
+ // Get the account root
+ mpAccounts->GetAccountRoot(*i, rootDir, discSet);
+
+ // Reset tagging as HousekeepStoreAccount will
+ // do that itself, to avoid duplicate tagging.
+ // Happens automatically when tagWithClientID
+ // goes out of scope.
+ }
// Do housekeeping on this account
HousekeepStoreAccount housekeeping(*i, rootDir,