diff options
author | Adam Midvidy <amidvidy@gmail.com> | 2015-06-24 13:54:45 -0400 |
---|---|---|
committer | Adam Midvidy <amidvidy@gmail.com> | 2015-06-24 15:50:30 -0400 |
commit | 1fc9cba6988ab1b600be1a0549caf6146619e4df (patch) | |
tree | a5fcf53a04666b1bfc2ca43332cd824894154985 /src/mongo/tools | |
parent | 313c3bdc2547f2746639e84f8668a756ad95d8f3 (diff) | |
download | mongo-1fc9cba6988ab1b600be1a0549caf6146619e4df.tar.gz |
SERVER-19035 autodetect support for OP_COMMAND in remote servers
Diffstat (limited to 'src/mongo/tools')
-rw-r--r-- | src/mongo/tools/bridge.cpp | 2 | ||||
-rw-r--r-- | src/mongo/tools/sniffer.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/tools/bridge.cpp b/src/mongo/tools/bridge.cpp index dafc44b272b..b22153a3db9 100644 --- a/src/mongo/tools/bridge.cpp +++ b/src/mongo/tools/bridge.cpp @@ -94,7 +94,7 @@ public: int oldId = m.header().getId(); if (m.operation() == dbQuery || m.operation() == dbMsg || - m.operation() == dbGetMore) { + m.operation() == dbGetMore || m.operation() == dbCommand) { bool exhaust = false; if (m.operation() == dbQuery) { DbMessage d(m); diff --git a/src/mongo/tools/sniffer.cpp b/src/mongo/tools/sniffer.cpp index 3e4712c1223..a3c10c23d18 100644 --- a/src/mongo/tools/sniffer.cpp +++ b/src/mongo/tools/sniffer.cpp @@ -67,6 +67,8 @@ #include "mongo/db/dbmessage.h" #include "mongo/util/net/message.h" #include "mongo/db/storage/mmap_v1/mmap.h" +#include "mongo/util/assert_util.h" +#include "mongo/util/net/message.h" #include "mongo/util/quick_exit.h" #include "mongo/util/text.h" @@ -362,7 +364,7 @@ void processMessage(Connection& c, Message& m) { std::shared_ptr<DBClientConnection> conn = forwarder[c]; if (!conn) { conn.reset(new DBClientConnection(true)); - conn->connect(forwardAddress); + uassertStatusOK(conn->connect(mongo::HostAndPort{forwardAddress})); forwarder[c] = conn; } if (m.operation() == mongo::dbQuery || m.operation() == mongo::dbGetMore) { |