diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2015-04-02 18:31:45 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2015-04-06 11:03:14 -0400 |
commit | 453c0b526ae5ed429caab2b6970d452c8d405a85 (patch) | |
tree | 21ca854cdbf18b5cb864081ba8bdbac31a3935ce /src/mongo/db/client.cpp | |
parent | e5557509152b2d2c8bf26af80f469ce09eddc9d1 (diff) | |
download | mongo-453c0b526ae5ed429caab2b6970d452c8d405a85.tar.gz |
SERVER-17817 Attach pointer to ServiceContext to ClientBasic.
Diffstat (limited to 'src/mongo/db/client.cpp')
-rw-r--r-- | src/mongo/db/client.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/client.cpp b/src/mongo/db/client.cpp index 85617b55df5..a893bbeb756 100644 --- a/src/mongo/db/client.cpp +++ b/src/mongo/db/client.cpp @@ -54,6 +54,7 @@ #include "mongo/db/instance.h" #include "mongo/db/json.h" #include "mongo/db/lasterror.h" +#include "mongo/db/service_context.h" #include "mongo/db/storage_options.h" #include "mongo/s/chunk_version.h" #include "mongo/s/d_state.h" @@ -94,7 +95,7 @@ namespace mongo { mongo::lastError.initThread(); // Create the client obj, attach to thread - Client* client = new Client(fullDesc, mp); + Client* client = new Client(fullDesc, getGlobalServiceContext(), mp); client->setAuthorizationSession( new AuthorizationSession( new AuthzSessionExternalStateMongod(getGlobalAuthorizationManager()))); @@ -106,8 +107,8 @@ namespace mongo { clients.insert(client); } - Client::Client(const string& desc, AbstractMessagingPort *p) - : ClientBasic(p), + Client::Client(const string& desc, ServiceContext* serviceContext, AbstractMessagingPort *p) + : ClientBasic(serviceContext, p), _desc(desc), _threadId(boost::this_thread::get_id()), _connectionId(p ? p->connectionId() : 0), |