- Improve DNS failure message to include lookup host

--HG--
extra : convert_revision : c0555e457f4da6b618b87f2cf4bf5c4c4d0f9e28
This commit is contained in:
Matt Johnston 2008-09-18 16:34:18 +00:00
parent d981ff2c8d
commit d54f38caf2

View File

@ -321,9 +321,10 @@ int connect_remote(const char* remotehost, const char* remoteport,
if (err) { if (err) {
if (errstring != NULL && *errstring == NULL) { if (errstring != NULL && *errstring == NULL) {
int len; int len;
len = 20 + strlen(gai_strerror(err)); len = 100 + strlen(gai_strerror(err));
*errstring = (char*)m_malloc(len); *errstring = (char*)m_malloc(len);
snprintf(*errstring, len, "Error resolving: %s", gai_strerror(err)); snprintf(*errstring, len, "Error resolving '%s' port '%s'. %s",
remotehost, remoteport, gai_strerror(err));
} }
TRACE(("Error resolving: %s", gai_strerror(err))) TRACE(("Error resolving: %s", gai_strerror(err)))
return -1; return -1;