changeset 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 79c657a673ec
children 9dbc0c443497
files dbutil.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
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;