summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-03-02 09:00:53 +0000
committerChris Wilson <chris+github@qwirx.com>2014-03-02 09:00:53 +0000
commit15677eb9461ef9f868d0cb56b1b7fb2c8601d377 (patch)
treeb875d6dc62b4b9ed76cd5b1ac89ecfcdc8695ba8
parent7723643183f186fc0d5064755d8ba825cb8755cb (diff)
Whitespace, comments and log messages cleanups.
-rw-r--r--bin/bbackupd/BackupClientContext.cpp10
-rw-r--r--lib/backupstore/BackupStoreAccounts.cpp2
-rw-r--r--lib/backupstore/BackupStoreCheck.cpp2
-rw-r--r--lib/backupstore/BackupStoreCheck2.cpp2
-rw-r--r--lib/backupstore/BackupStoreRefCountDatabase.cpp4
-rw-r--r--lib/backupstore/BackupStoreRefCountDatabase.h9
-rw-r--r--lib/backupstore/HousekeepStoreAccount.cpp2
-rwxr-xr-xlib/server/makeprotocol.pl.in2
8 files changed, 17 insertions, 16 deletions
diff --git a/bin/bbackupd/BackupClientContext.cpp b/bin/bbackupd/BackupClientContext.cpp
index 45c48a67..f37d3d6b 100644
--- a/bin/bbackupd/BackupClientContext.cpp
+++ b/bin/bbackupd/BackupClientContext.cpp
@@ -124,7 +124,7 @@ BackupProtocolClient &BackupClientContext::GetConnection()
{
// Defensive.
mapConnection.reset();
-
+
// Log intention
BOX_INFO("Opening connection to server '" <<
mHostname << "'...");
@@ -132,7 +132,7 @@ BackupProtocolClient &BackupClientContext::GetConnection()
// Connect!
((SocketStreamTLS *)(apSocket.get()))->Open(mrTLSContext,
Socket::TypeINET, mHostname, mPort);
-
+
if(mTcpNiceMode)
{
// Pass control of apSocket to NiceSocketStream,
@@ -148,7 +148,7 @@ BackupProtocolClient &BackupClientContext::GetConnection()
// Set logging option
mapConnection->SetLogToSysLog(mExtendedLogging);
-
+
if (mExtendedLogToFile)
{
ASSERT(mpExtendedLogFileHandle == NULL);
@@ -183,7 +183,7 @@ BackupProtocolClient &BackupClientContext::GetConnection()
// Login -- if this fails, the Protocol will exception
std::auto_ptr<BackupProtocolLoginConfirmed> loginConf(
mapConnection->QueryLogin(mAccountNumber, 0 /* read/write */));
-
+
// Check that the client store marker is the one we expect
if(mClientStoreMarker != ClientStoreMarker_NotKnown)
{
@@ -203,7 +203,7 @@ BackupProtocolClient &BackupClientContext::GetConnection()
THROW_EXCEPTION(BackupStoreException, ClientMarkerNotAsExpected)
}
}
-
+
// Log success
BOX_INFO("Connection made, login successful");
diff --git a/lib/backupstore/BackupStoreAccounts.cpp b/lib/backupstore/BackupStoreAccounts.cpp
index bbf85f8a..22628017 100644
--- a/lib/backupstore/BackupStoreAccounts.cpp
+++ b/lib/backupstore/BackupStoreAccounts.cpp
@@ -205,7 +205,7 @@ void BackupStoreAccounts::LockAccount(int32_t ID, NamedLock& rNamedLock)
{
THROW_EXCEPTION_MESSAGE(BackupStoreException,
CouldNotLockStoreAccount, "Failed to get exclusive "
- "lock on account " << ID);
+ "lock on account " << BOX_FORMAT_ACCOUNT(ID));
}
}
diff --git a/lib/backupstore/BackupStoreCheck.cpp b/lib/backupstore/BackupStoreCheck.cpp
index 128d97d4..70fe4a1e 100644
--- a/lib/backupstore/BackupStoreCheck.cpp
+++ b/lib/backupstore/BackupStoreCheck.cpp
@@ -918,7 +918,7 @@ bool BackupStoreCheck::CheckDirectoryEntry(BackupStoreDirectory::Entry& rEntry,
else
{
// This is OK for files, they might move
- BOX_NOTICE("File ID " <<
+ BOX_INFO("File ID " <<
BOX_FORMAT_OBJECTID(rEntry.GetObjectID())
<< " has different container ID, "
"probably moved");
diff --git a/lib/backupstore/BackupStoreCheck2.cpp b/lib/backupstore/BackupStoreCheck2.cpp
index ae3ca919..15403f3d 100644
--- a/lib/backupstore/BackupStoreCheck2.cpp
+++ b/lib/backupstore/BackupStoreCheck2.cpp
@@ -684,7 +684,7 @@ void BackupStoreCheck::WriteNewStoreInfo()
if(mFixErrors)
{
info->Save();
- BOX_NOTICE("New store info file written successfully.");
+ BOX_INFO("New store info file written successfully.");
}
}
diff --git a/lib/backupstore/BackupStoreRefCountDatabase.cpp b/lib/backupstore/BackupStoreRefCountDatabase.cpp
index 86f75a55..3f3eb94b 100644
--- a/lib/backupstore/BackupStoreRefCountDatabase.cpp
+++ b/lib/backupstore/BackupStoreRefCountDatabase.cpp
@@ -155,8 +155,8 @@ std::string BackupStoreRefCountDatabase::GetFilename(const
// Function
// Name: BackupStoreRefCountDatabase::Create(int32_t,
// const std::string &, int, bool)
-// Purpose: Create a new database, overwriting an existing
-// one only if AllowOverwrite is true.
+// Purpose: Create a blank database, using a temporary file that
+// you must Discard() or Commit() to make permanent.
// Created: 2003/08/28
//
// --------------------------------------------------------------------------
diff --git a/lib/backupstore/BackupStoreRefCountDatabase.h b/lib/backupstore/BackupStoreRefCountDatabase.h
index f0c1222f..797f05dc 100644
--- a/lib/backupstore/BackupStoreRefCountDatabase.h
+++ b/lib/backupstore/BackupStoreRefCountDatabase.h
@@ -66,22 +66,23 @@ private:
BackupStoreRefCountDatabase(const BackupStoreRefCountDatabase &);
public:
- // Create a new database for a new account.
+ // Create a blank database, using a temporary file that you must
+ // Discard() or Commit() to make permanent.
static std::auto_ptr<BackupStoreRefCountDatabase> Create
(const BackupStoreAccountDatabase::Entry& rAccount);
void Commit();
void Discard();
-
+
// Load it from the store
static std::auto_ptr<BackupStoreRefCountDatabase> Load(const
BackupStoreAccountDatabase::Entry& rAccount, bool ReadOnly);
-
+
typedef uint32_t refcount_t;
// Data access functions
refcount_t GetRefCount(int64_t ObjectID) const;
int64_t GetLastObjectIDUsed() const;
-
+
// Data modification functions
void AddReference(int64_t ObjectID);
// RemoveReference returns false if refcount drops to zero
diff --git a/lib/backupstore/HousekeepStoreAccount.cpp b/lib/backupstore/HousekeepStoreAccount.cpp
index e5339acc..75e7c8ca 100644
--- a/lib/backupstore/HousekeepStoreAccount.cpp
+++ b/lib/backupstore/HousekeepStoreAccount.cpp
@@ -235,7 +235,7 @@ bool HousekeepStoreAccount::DoHousekeeping(bool KeepTryingForever)
catch(BoxException &e)
{
BOX_WARNING("Reference count database was missing or "
- "corrupted during housekeeping, cannot check for "
+ "corrupted during housekeeping, cannot check it for "
"errors.");
}
diff --git a/lib/server/makeprotocol.pl.in b/lib/server/makeprotocol.pl.in
index 1c8f6081..db9764fb 100755
--- a/lib/server/makeprotocol.pl.in
+++ b/lib/server/makeprotocol.pl.in
@@ -863,7 +863,7 @@ __E
}
}
}
-
+
if($writing_local)
{
print H <<__E;