diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-07-03 15:18:40 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-07-03 15:18:40 +0200 |
commit | 21807217e257bb052cf19a5ce909c64d97190b5f (patch) | |
tree | d7130bc52c2083fe3598b6a525244f256127729c | |
parent | Merge pull request #4005 (diff) | |
parent | zmq_server: fix bind call when address and/or port are empty (diff) | |
download | monero-21807217e257bb052cf19a5ce909c64d97190b5f.tar.xz |
Merge pull request #4012
5b5828fc zmq_server: fix bind call when address and/or port are empty (moneromooo-monero)
-rw-r--r-- | src/rpc/zmq_server.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rpc/zmq_server.cpp b/src/rpc/zmq_server.cpp index 3aee8c4c7..edd3e6669 100644 --- a/src/rpc/zmq_server.cpp +++ b/src/rpc/zmq_server.cpp @@ -104,6 +104,10 @@ bool ZmqServer::addTCPSocket(std::string address, std::string port) rep_socket->setsockopt(ZMQ_RCVTIMEO, &DEFAULT_RPC_RECV_TIMEOUT_MS, sizeof(DEFAULT_RPC_RECV_TIMEOUT_MS)); + if (address.empty()) + address = "*"; + if (port.empty()) + port = "*"; std::string bind_address = addr_prefix + address + std::string(":") + port; rep_socket->bind(bind_address.c_str()); } |