Commit 1824574f authored by Mikko Koppanen's avatar Mikko Koppanen

Minor fixes to get_address code to fix build on solaris and freebsd. Also…

Minor fixes to get_address code to fix build on solaris and freebsd. Also service doesnt need to be discovered here
parent 78d24d3d
...@@ -124,7 +124,6 @@ int zmq::tcp_listener_t::get_address (std::string &addr_) ...@@ -124,7 +124,6 @@ int zmq::tcp_listener_t::get_address (std::string &addr_)
{ {
struct sockaddr_storage ss; struct sockaddr_storage ss;
char host [NI_MAXHOST]; char host [NI_MAXHOST];
char serv_info [NI_MAXSERV];
int rc; int rc;
std::stringstream address; std::stringstream address;
...@@ -135,7 +134,7 @@ int zmq::tcp_listener_t::get_address (std::string &addr_) ...@@ -135,7 +134,7 @@ int zmq::tcp_listener_t::get_address (std::string &addr_)
return rc; return rc;
} }
rc = getnameinfo ((struct sockaddr *) &ss, sizeof (ss), host, NI_MAXHOST, serv_info, NI_MAXSERV, NI_NUMERICHOST); rc = getnameinfo ((struct sockaddr *) &ss, sl, host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
if (rc != 0) { if (rc != 0) {
return rc; return rc;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment