summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2019-10-10 14:42:44 +0000
committerevergreen <evergreen@mongodb.com>2019-10-10 14:42:44 +0000
commitab77143b2163da066776bd965e0cd3a931d9aa10 (patch)
treef8eb64674eb9a27079c0f9aaeda9217724202ebd
parent00956ca3af08029dae3e4e0eb2c27bcf8a6bd923 (diff)
downloadmongo-ab77143b2163da066776bd965e0cd3a931d9aa10.tar.gz
SERVER-43265 Fix using URI network compressors parameter in shell
-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 bfc5b451871..1d6ab03990e 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"
@@ -282,7 +283,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";