summaryrefslogtreecommitdiff
path: root/lib/backupstore
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2011-12-13 00:43:41 +0000
committerChris Wilson <chris+github@qwirx.com>2011-12-13 00:43:41 +0000
commitdea24ce69f88e2e28dce35aacaba83c90adb6cff (patch)
tree0453cb9860330a2d33b12c2c2a4eaf9cf0c988c4 /lib/backupstore
parent20a8c39aa25d454a3fa142f125003ad242d73ea0 (diff)
Add remote host and port to post-login login message, requested by Pete Jalajas.
Diffstat (limited to 'lib/backupstore')
-rw-r--r--lib/backupstore/BackupCommands.cpp3
-rw-r--r--lib/backupstore/BackupStoreContext.cpp5
-rw-r--r--lib/backupstore/BackupStoreContext.h5
3 files changed, 9 insertions, 4 deletions
diff --git a/lib/backupstore/BackupCommands.cpp b/lib/backupstore/BackupCommands.cpp
index b2a42eb7..66764a3b 100644
--- a/lib/backupstore/BackupCommands.cpp
+++ b/lib/backupstore/BackupCommands.cpp
@@ -131,7 +131,8 @@ std::auto_ptr<BackupProtocolMessage> BackupProtocolLogin::DoCommand(BackupProtoc
BOX_FORMAT_ACCOUNT(mClientID) << " "
"(name=" << rContext.GetAccountName() << "): " <<
(((mFlags & Flags_ReadOnly) != Flags_ReadOnly)
- ?"Read/Write":"Read-only"));
+ ?"Read/Write":"Read-only") << " from " <<
+ rContext.GetConnectionDetails());
// Get the usage info for reporting to the client
int64_t blocksUsed = 0, blocksSoftLimit = 0, blocksHardLimit = 0;
diff --git a/lib/backupstore/BackupStoreContext.cpp b/lib/backupstore/BackupStoreContext.cpp
index e44fa29d..2c98b1d7 100644
--- a/lib/backupstore/BackupStoreContext.cpp
+++ b/lib/backupstore/BackupStoreContext.cpp
@@ -54,8 +54,9 @@
//
// --------------------------------------------------------------------------
BackupStoreContext::BackupStoreContext(int32_t ClientID,
- HousekeepingInterface &rDaemon)
- : mClientID(ClientID),
+ HousekeepingInterface &rDaemon, const std::string& rConnectionDetails)
+ : mConnectionDetails(rConnectionDetails),
+ mClientID(ClientID),
mrDaemon(rDaemon),
mProtocolPhase(Phase_START),
mClientHasAccount(false),
diff --git a/lib/backupstore/BackupStoreContext.h b/lib/backupstore/BackupStoreContext.h
index 7388f753..c2fe14ff 100644
--- a/lib/backupstore/BackupStoreContext.h
+++ b/lib/backupstore/BackupStoreContext.h
@@ -45,7 +45,8 @@ class HousekeepingInterface
class BackupStoreContext
{
public:
- BackupStoreContext(int32_t ClientID, HousekeepingInterface &rDaemon);
+ BackupStoreContext(int32_t ClientID, HousekeepingInterface &rDaemon,
+ const std::string& rConnectionDetails);
~BackupStoreContext();
private:
BackupStoreContext(const BackupStoreContext &rToCopy);
@@ -137,6 +138,7 @@ public:
// Info
int32_t GetClientID() const {return mClientID;}
+ const std::string& GetConnectionDetails() { return mConnectionDetails; }
private:
void MakeObjectFilename(int64_t ObjectID, std::string &rOutput, bool EnsureDirectoryExists = false);
@@ -146,6 +148,7 @@ private:
void DeleteDirectoryRecurse(int64_t ObjectID, int64_t &rBlocksDeletedOut, bool Undelete);
int64_t AllocateObjectID();
+ std::string mConnectionDetails;
int32_t mClientID;
HousekeepingInterface &mrDaemon;
int mProtocolPhase;