# HG changeset patch # User Matt Johnston # Date 1221755658 0 # Node ID bd2634b03b12e9b9c0011ceb426466bf4b43dd9a # Parent 79c657a673ec6ec2a719fc7a35104c3348d86e02 - Improve DNS failure message to include lookup host diff -r 79c657a673ec -r bd2634b03b12 dbutil.c --- 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;