From 453c0b526ae5ed429caab2b6970d452c8d405a85 Mon Sep 17 00:00:00 2001 From: Andy Schwerin Date: Thu, 2 Apr 2015 18:31:45 -0400 Subject: SERVER-17817 Attach pointer to ServiceContext to ClientBasic. --- src/mongo/db/client.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mongo/db/client.cpp') 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), -- cgit v1.2.1