diff options
-rw-r--r-- | db/client.h | 6 | ||||
-rw-r--r-- | db/dbcommands.cpp | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/db/client.h b/db/client.h index 9a40c79d895..ccfceccf307 100644 --- a/db/client.h +++ b/db/client.h @@ -42,6 +42,8 @@ namespace mongo { extern boost::thread_specific_ptr<Client> currentClient; + typedef long long ConnectionId; + class Client : boost::noncopyable { public: class Context; @@ -97,10 +99,10 @@ namespace mongo { MessagingPort * port() const { return _mp; } - unsigned getConnectionId() const { return _connectionId; } + ConnectionId getConnectionId() const { return _connectionId; } private: - unsigned _connectionId; // > 0 for things "conn", 0 otherwise + ConnectionId _connectionId; // > 0 for things "conn", 0 otherwise CurOp * _curOp; Context * _context; bool _shutdown; diff --git a/db/dbcommands.cpp b/db/dbcommands.cpp index b40fd891868..ce9f0ef3ddf 100644 --- a/db/dbcommands.cpp +++ b/db/dbcommands.cpp @@ -111,7 +111,7 @@ namespace mongo { Client& c = cc(); c.appendLastOp( result ); - result.append( "connectionId" , c.getConnectionId() ); + result.appendNumber( "connectionId" , c.getConnectionId() ); BSONObj cmdObj = _cmdObj; { |