summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-03-06 16:32:19 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-03-06 16:32:19 +0100
commit9481c69b0f60068f12aa26699588fed6a8faceec (patch)
treee0558b8b758b38e3b7b580f5a4815a3c3259a50f
parent26b0aea24f9add0a1811e23f709d96b44b459571 (diff)
problem with NIC name resolution on OSX fixed
-rw-r--r--src/ip.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ip.cpp b/src/ip.cpp
index eebfcb5..79d90da 100644
--- a/src/ip.cpp
+++ b/src/ip.cpp
@@ -148,6 +148,7 @@ static int resolve_nic_name (in_addr* addr_, char const *interface_)
{
*addr_ = ((sockaddr_in*) ifp->ifa_addr)->sin_addr;
found = true;
+ break;
}
// Clean-up;
@@ -192,6 +193,7 @@ int zmq::resolve_ip_interface (sockaddr_storage* addr_, socklen_t *addr_len_,
// Initialise IPv4-format family/port.
sockaddr_in ip4_addr;
+ memset (&ip4_addr, 0, sizeof (ip4_addr));
ip4_addr.sin_family = AF_INET;
ip4_addr.sin_port = htons ((uint16_t) atoi (service.c_str()));