diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-02-09 13:45:43 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-02-09 13:45:43 +0000 |
commit | e9a8f940a4220416d3ddda576dcfedca585211f9 (patch) | |
tree | ab177af067be3bcc5b8cb5c21e8503d116b6abac /bin/bbstored | |
parent | 7ed8179f09c77de15a3f250312b5e33ba53a60b5 (diff) |
Get backup connection stats from BackupProtocolServer.
One less reason to hang onto a Stream reference, that will go away soon.
Diffstat (limited to 'bin/bbstored')
-rw-r--r-- | bin/bbstored/BackupStoreDaemon.cpp | 14 | ||||
-rw-r--r-- | bin/bbstored/BackupStoreDaemon.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/bin/bbstored/BackupStoreDaemon.cpp b/bin/bbstored/BackupStoreDaemon.cpp index 70ca1d67..a2ac47a5 100644 --- a/bin/bbstored/BackupStoreDaemon.cpp +++ b/bin/bbstored/BackupStoreDaemon.cpp @@ -355,22 +355,22 @@ void BackupStoreDaemon::Connection2(SocketStreamTLS &rStream) } catch(...) { - LogConnectionStats(id, context.GetAccountName(), rStream); + LogConnectionStats(id, context.GetAccountName(), server); throw; } - LogConnectionStats(id, context.GetAccountName(), rStream); + LogConnectionStats(id, context.GetAccountName(), server); context.CleanUp(); } void BackupStoreDaemon::LogConnectionStats(uint32_t accountId, - const std::string& accountName, const SocketStreamTLS &s) + const std::string& accountName, const BackupProtocolServer &server) { // Log the amount of data transferred BOX_NOTICE("Connection statistics for " << BOX_FORMAT_ACCOUNT(accountId) << " " "(name=" << accountName << "):" - " IN=" << s.GetBytesRead() << - " OUT=" << s.GetBytesWritten() << - " NET_IN=" << (s.GetBytesRead() - s.GetBytesWritten()) << - " TOTAL=" << (s.GetBytesRead() + s.GetBytesWritten())); + " IN=" << server.GetBytesRead() << + " OUT=" << server.GetBytesWritten() << + " NET_IN=" << (server.GetBytesRead() - server.GetBytesWritten()) << + " TOTAL=" << (server.GetBytesRead() + server.GetBytesWritten())); } diff --git a/bin/bbstored/BackupStoreDaemon.h b/bin/bbstored/BackupStoreDaemon.h index ce538477..40ef607d 100644 --- a/bin/bbstored/BackupStoreDaemon.h +++ b/bin/bbstored/BackupStoreDaemon.h @@ -64,7 +64,7 @@ protected: void HousekeepingProcess(); void LogConnectionStats(uint32_t accountId, - const std::string& accountName, const SocketStreamTLS &s); + const std::string& accountName, const BackupProtocolServer &server); public: // HousekeepingInterface implementation |