summaryrefslogtreecommitdiff
path: root/src/mongo/db/dbmessage.cpp
diff options
context:
space:
mode:
authorsamantharitter <samantha.ritter@10gen.com>2016-11-04 14:45:32 -0400
committersamantharitter <samantha.ritter@10gen.com>2016-11-05 21:26:59 -0400
commit0ac04999faae1d2fc0e10972aaf21082a2e48c8f (patch)
treed9b74efcf36c5381469cc622c3aea4c0f8166398 /src/mongo/db/dbmessage.cpp
parent2d1dd9e07a40f314853e29bffb56b45bf21df940 (diff)
downloadmongo-0ac04999faae1d2fc0e10972aaf21082a2e48c8f.tar.gz
SERVER-26674 transport::Session objects should be shared_ptr managed
Diffstat (limited to 'src/mongo/db/dbmessage.cpp')
-rw-r--r--src/mongo/db/dbmessage.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/dbmessage.cpp b/src/mongo/db/dbmessage.cpp
index 182d538764b..1b991041094 100644
--- a/src/mongo/db/dbmessage.cpp
+++ b/src/mongo/db/dbmessage.cpp
@@ -177,7 +177,7 @@ OpQueryReplyBuilder::OpQueryReplyBuilder() : _buffer(32768) {
_buffer.skip(sizeof(QueryResult::Value));
}
-void OpQueryReplyBuilder::send(transport::Session* session,
+void OpQueryReplyBuilder::send(const transport::SessionHandle& session,
int queryResultFlags,
const Message& requestMsg,
int nReturned,
@@ -192,7 +192,8 @@ void OpQueryReplyBuilder::send(transport::Session* session,
uassertStatusOK(session->sinkMessage(response).wait());
}
-void OpQueryReplyBuilder::sendCommandReply(transport::Session* session, const Message& requestMsg) {
+void OpQueryReplyBuilder::sendCommandReply(const transport::SessionHandle& session,
+ const Message& requestMsg) {
send(session, /*queryFlags*/ 0, requestMsg, /*nReturned*/ 1);
}
@@ -209,7 +210,7 @@ void OpQueryReplyBuilder::putInMessage(
}
void replyToQuery(int queryResultFlags,
- transport::Session* session,
+ const transport::SessionHandle& session,
Message& requestMsg,
const void* data,
int size,
@@ -222,7 +223,7 @@ void replyToQuery(int queryResultFlags,
}
void replyToQuery(int queryResultFlags,
- transport::Session* session,
+ const transport::SessionHandle& session,
Message& requestMsg,
const BSONObj& responseObj) {
replyToQuery(queryResultFlags,