summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2019-10-15 14:33:55 +0000
committerevergreen <evergreen@mongodb.com>2019-10-15 14:33:55 +0000
commitb7207194e5dcbf439b5c774cc1970015d545caf8 (patch)
treedb2b9c2e6d2d78e514daa998891d5e3655474eb7
parent3135b6a77d4fbabccc113186817ba670e31d13b6 (diff)
downloadmongo-b7207194e5dcbf439b5c774cc1970015d545caf8.tar.gz
SERVER-43265 Fix using URI network compressors parameter in shell
(cherry picked from commit ab77143b2163da066776bd965e0cd3a931d9aa10)
-rw-r--r--src/mongo/shell/shell_options.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/shell/shell_options.cpp b/src/mongo/shell/shell_options.cpp
index 1d359f9affa..0b716b1f3f3 100644
--- a/src/mongo/shell/shell_options.cpp
+++ b/src/mongo/shell/shell_options.cpp
@@ -45,6 +45,7 @@
#include "mongo/db/server_options.h"
#include "mongo/rpc/protocol.h"
#include "mongo/shell/shell_utils.h"
+#include "mongo/transport/message_compressor_options_client_gen.h"
#include "mongo/transport/message_compressor_registry.h"
#include "mongo/util/log.h"
#include "mongo/util/net/socket_utils.h"
@@ -278,7 +279,8 @@ Status storeMongoShellOptions(const moe::Environment& params,
} else if (shellGlobalParams.gssapiServiceName != saslDefaultServiceName &&
uriOptions.count("gssapiServiceName")) {
sb << "the GSSAPI service name";
- } else if (!shellGlobalParams.networkMessageCompressors.empty() &&
+ } else if (shellGlobalParams.networkMessageCompressors !=
+ kNet_compression_compressorsDefault &&
uriOptions.count("compressors") &&
uriOptions["compressors"] != shellGlobalParams.networkMessageCompressors) {
sb << "different network message compressors";