improved error handling

This commit is contained in:
Martin Sustrik
2009-08-29 09:41:50 +02:00
parent cb09c6951e
commit 6996ef6f1a
5 changed files with 61 additions and 87 deletions

View File

@@ -285,7 +285,8 @@ int zmq::resolve_ip_hostname (sockaddr_in *addr_, const char *hostname_)
// Separate the hostname.
std::string hostname (hostname_, delimiter - hostname_);
// Resolve host name.
// Resolve host name. Some of the error info is lost in case of error,
// however, there's no way to report EAI errors via errno.
addrinfo req;
memset (&req, 0, sizeof (req));
req.ai_family = AF_INET;