From 0ac04999faae1d2fc0e10972aaf21082a2e48c8f Mon Sep 17 00:00:00 2001 From: samantharitter Date: Fri, 4 Nov 2016 14:45:32 -0400 Subject: SERVER-26674 transport::Session objects should be shared_ptr managed --- src/mongo/db/dbmessage.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/mongo/db/dbmessage.h') diff --git a/src/mongo/db/dbmessage.h b/src/mongo/db/dbmessage.h index 63d3aaea350..405b96c35af 100644 --- a/src/mongo/db/dbmessage.h +++ b/src/mongo/db/dbmessage.h @@ -35,6 +35,7 @@ #include "mongo/client/constants.h" #include "mongo/db/jsobj.h" #include "mongo/db/server_options.h" +#include "mongo/transport/session.h" #include "mongo/util/net/abstract_message_port.h" #include "mongo/util/net/message.h" @@ -42,10 +43,6 @@ namespace mongo { class OperationContext; -namespace transport { -class Session; -} // namespace transport - /* db response format Query or GetMore: // see struct QueryResult @@ -363,7 +360,7 @@ public: /** * Finishes the reply and sends the message out to 'destination'. */ - void send(transport::Session* session, + void send(const transport::SessionHandle& session, int queryResultFlags, const Message& requestMsg, int nReturned, @@ -373,14 +370,14 @@ public: /** * Similar to send() but used for replying to a command. */ - void sendCommandReply(transport::Session* session, const Message& requestMsg); + void sendCommandReply(const transport::SessionHandle& session, const Message& requestMsg); private: BufBuilder _buffer; }; void replyToQuery(int queryResultFlags, - transport::Session* session, + const transport::SessionHandle& session, Message& requestMsg, const void* data, int size, @@ -390,7 +387,7 @@ void replyToQuery(int queryResultFlags, /* object reply helper. */ void replyToQuery(int queryResultFlags, - transport::Session* session, + const transport::SessionHandle& session, Message& requestMsg, const BSONObj& responseObj); -- cgit v1.2.1