- Timestamp:
- 12/12/2011 23:36:25 (5 months ago)
- Location:
- box/trunk
- Files:
-
- 5 edited
-
. (modified) (1 prop)
-
bin/bbstored/BackupStoreDaemon.cpp (modified) (2 diffs)
-
bin/bbstored/BackupStoreDaemon.h (modified) (1 diff)
-
lib/backupstore/BackupCommands.cpp (modified) (4 diffs)
-
lib/backupstore/BackupStoreContext.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk
- Property svn:mergeinfo changed
/box/RELEASE/0.11 (added) merged: 2741-2745 /box/RELEASE/0.11.1 (added) merged: 2823,2827
- Property svn:mergeinfo changed
-
box/trunk/bin/bbstored/BackupStoreDaemon.cpp
r2983 r3048 318 318 { 319 319 // Bad! Disconnect immediately 320 BOX_WARNING("Failed login: invalid client common name: " << 321 clientCommonName); 320 322 return; 321 323 } … … 354 356 catch(...) 355 357 { 356 LogConnectionStats( clientCommonName.c_str(), rStream);358 LogConnectionStats(id, context.GetAccountName(), rStream); 357 359 throw; 358 360 } 359 LogConnectionStats( clientCommonName.c_str(), rStream);361 LogConnectionStats(id, context.GetAccountName(), rStream); 360 362 context.CleanUp(); 361 363 } 362 364 363 void BackupStoreDaemon::LogConnectionStats( const char *commonName,364 const SocketStreamTLS &s)365 void BackupStoreDaemon::LogConnectionStats(uint32_t accountId, 366 const std::string& accountName, const SocketStreamTLS &s) 365 367 { 366 368 // Log the amount of data transferred 367 BOX_NOTICE("Connection statistics for " << commonName << ":" 369 BOX_NOTICE("Connection statistics for " << 370 BOX_FORMAT_ACCOUNT(accountId) << " " 371 "(name=" << accountName << "):" 368 372 " IN=" << s.GetBytesRead() << 369 373 " OUT=" << s.GetBytesWritten() << -
box/trunk/bin/bbstored/BackupStoreDaemon.h
r2541 r3048 64 64 void HousekeepingProcess(); 65 65 66 void LogConnectionStats(const char *commonName, const SocketStreamTLS &s); 66 void LogConnectionStats(uint32_t accountId, 67 const std::string& accountName, const SocketStreamTLS &s); 67 68 68 69 public: -
box/trunk/lib/backupstore/BackupCommands.cpp
r2983 r3048 90 90 { 91 91 BOX_WARNING("Failed login from client ID " << 92 BOX_FORMAT_ACCOUNT(mClientID) << 93 " :wrong certificate for this account");92 BOX_FORMAT_ACCOUNT(mClientID) << ": " 93 "wrong certificate for this account"); 94 94 return PROTOCOL_ERROR(Err_BadLogin); 95 95 } … … 98 98 { 99 99 BOX_WARNING("Failed login from client ID " << 100 BOX_FORMAT_ACCOUNT(mClientID) << 101 " :no such account on this server");100 BOX_FORMAT_ACCOUNT(mClientID) << ": " 101 "no such account on this server"); 102 102 return PROTOCOL_ERROR(Err_BadLogin); 103 103 } … … 129 129 // Log login 130 130 BOX_NOTICE("Login from Client ID " << 131 BOX_FORMAT_ACCOUNT(mClientID) << 132 " " <<131 BOX_FORMAT_ACCOUNT(mClientID) << " " 132 "(name=" << rContext.GetAccountName() << "): " << 133 133 (((mFlags & Flags_ReadOnly) != Flags_ReadOnly) 134 134 ?"Read/Write":"Read-only")); … … 153 153 { 154 154 BOX_NOTICE("Session finished for Client ID " << 155 BOX_FORMAT_ACCOUNT(rContext.GetClientID())); 155 BOX_FORMAT_ACCOUNT(rContext.GetClientID()) << " " 156 "(name=" << rContext.GetAccountName() << ")"); 156 157 157 158 // Let the context know about it -
box/trunk/lib/backupstore/BackupStoreContext.h
r2988 r3048 16 16 17 17 #include "autogen_BackupProtocol.h" 18 #include "BackupStoreInfo.h" 18 19 #include "BackupStoreRefCountDatabase.h" 19 20 #include "NamedLock.h" … … 23 24 class BackupStoreDirectory; 24 25 class BackupStoreFilename; 25 class BackupStoreInfo;26 26 class IOStream; 27 27 class BackupProtocolMessage; … … 81 81 void SaveStoreInfo(bool AllowDelay = true); 82 82 const BackupStoreInfo &GetBackupStoreInfo() const; 83 const std::string GetAccountName() 84 { 85 if(!mapStoreInfo.get()) 86 { 87 return "Unknown"; 88 } 89 return mapStoreInfo->GetAccountName(); 90 } 83 91 84 92 // Client marker
Note: See TracChangeset
for help on using the changeset viewer.
