diff options
author | Adam Cooper <adam.cooper@mongodb.com> | 2018-06-11 17:35:51 -0400 |
---|---|---|
committer | Adam Cooper <adam.cooper@mongodb.com> | 2018-06-11 17:35:51 -0400 |
commit | 84ccd279f2910a73b10678685b2a6a90bb6dd8fb (patch) | |
tree | 259e5e3154fa2c5a81a15e81248c873374a32c3e /src/mongo/db/repl/repl_set_commands.cpp | |
parent | 5e7ad8a40626fa24574e4a2b17f810812f288ec8 (diff) | |
download | mongo-84ccd279f2910a73b10678685b2a6a90bb6dd8fb.tar.gz |
SERVER-35101 Strip trailing and leading whitespace from bind_ip arguments and change to
std::vector internally
Diffstat (limited to 'src/mongo/db/repl/repl_set_commands.cpp')
-rw-r--r-- | src/mongo/db/repl/repl_set_commands.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mongo/db/repl/repl_set_commands.cpp b/src/mongo/db/repl/repl_set_commands.cpp index 6b2877cacb7..103612358d2 100644 --- a/src/mongo/db/repl/repl_set_commands.cpp +++ b/src/mongo/db/repl/repl_set_commands.cpp @@ -199,15 +199,11 @@ private: namespace { HostAndPort someHostAndPortForMe() { - const auto& bind_ip = serverGlobalParams.bind_ip; + const auto& addrs = serverGlobalParams.bind_ips; const auto& bind_port = serverGlobalParams.port; const auto& af = IPv6Enabled() ? AF_UNSPEC : AF_INET; bool localhost_only = true; - std::vector<std::string> addrs; - if (!bind_ip.empty()) { - boost::split(addrs, bind_ip, boost::is_any_of(","), boost::token_compress_on); - } for (const auto& addr : addrs) { // Get all addresses associated with each named bind host. // If we find any that are valid external identifiers, |