aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-07-03 15:18:40 +0200
committerRiccardo Spagni <ric@spagni.net>2018-07-03 15:18:40 +0200
commit21807217e257bb052cf19a5ce909c64d97190b5f (patch)
treed7130bc52c2083fe3598b6a525244f256127729c /src/rpc
parentMerge pull request #4005 (diff)
parentzmq_server: fix bind call when address and/or port are empty (diff)
downloadmonero-21807217e257bb052cf19a5ce909c64d97190b5f.tar.xz
Merge pull request #4012
5b5828fc zmq_server: fix bind call when address and/or port are empty (moneromooo-monero)
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/zmq_server.cpp4
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());
}