diff dbutil.c @ 490:bd2634b03b12

- Improve DNS failure message to include lookup host
author Matt Johnston <matt@ucc.asn.au>
date Thu, 18 Sep 2008 16:34:18 +0000
parents d59f628e7baa
children b956d6151600
line wrap: on
line diff
--- a/dbutil.c	Thu Sep 18 16:01:59 2008 +0000
+++ b/dbutil.c	Thu Sep 18 16:34:18 2008 +0000
@@ -321,9 +321,10 @@
 	if (err) {
 		if (errstring != NULL && *errstring == NULL) {
 			int len;
-			len = 20 + strlen(gai_strerror(err));
+			len = 100 + strlen(gai_strerror(err));
 			*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)))
 		return -1;