summaryrefslogtreecommitdiff
path: root/src/mongo/client
diff options
context:
space:
mode:
authorJonathan Reams <jbreams@mongodb.com>2017-04-17 12:09:33 -0400
committerJonathan Reams <jbreams@mongodb.com>2017-04-21 11:22:53 -0400
commitf929d2cfcfe48f051c32bdded11566b885816932 (patch)
tree2d4e17c2dd4cceaa95dfcb41c773962341e7a5ec /src/mongo/client
parentc2cb98f46c70772d054ab0885720b666ae318cf0 (diff)
downloadmongo-f929d2cfcfe48f051c32bdded11566b885816932.tar.gz
SERVER-28749 Unify ServiceEntryPointMongod and ServiceEntryPointMongos
Diffstat (limited to 'src/mongo/client')
-rw-r--r--src/mongo/client/dbclientcursor.cpp6
-rw-r--r--src/mongo/client/scoped_db_conn_test.cpp6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/mongo/client/dbclientcursor.cpp b/src/mongo/client/dbclientcursor.cpp
index bb74398b35f..db37bea3bf0 100644
--- a/src/mongo/client/dbclientcursor.cpp
+++ b/src/mongo/client/dbclientcursor.cpp
@@ -249,10 +249,8 @@ void DBClientCursor::commandDataReceived() {
// HACK: If we got an OP_COMMANDREPLY, take the reply object
// and shove it in to an OP_REPLY message.
if (op == dbCommandReply) {
- // Need to take ownership here as we destroy the underlying message.
- BSONObj reply = commandReply->getCommandReply().getOwned();
- batch.m.reset();
- replyToQuery(0, batch.m, reply);
+ BSONObj reply = commandReply->getCommandReply();
+ batch.m = replyToQuery(reply).response;
}
QueryResult::View qr = batch.m.singleData().view2ptr();
diff --git a/src/mongo/client/scoped_db_conn_test.cpp b/src/mongo/client/scoped_db_conn_test.cpp
index 41ae8d1af0c..57d196e7a88 100644
--- a/src/mongo/client/scoped_db_conn_test.cpp
+++ b/src/mongo/client/scoped_db_conn_test.cpp
@@ -95,6 +95,12 @@ public:
_replyDelay = delay;
}
+ DbResponse handleRequest(OperationContext* opCtx,
+ const Message& request,
+ const HostAndPort& client) override {
+ MONGO_UNREACHABLE;
+ }
+
private:
void run(transport::SessionHandle session) {
Message inMessage;