From: Marko Kreen Date: Mon, 8 Oct 2012 08:11:31 +0000 (+0300) Subject: dnslookup: more informative error from getaddrinfo_a() X-Git-Tag: pgbouncer_1_5_4~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bd9e0832c0d945db00168c67feb57aef7d68157a;p=pgbouncer dnslookup: more informative error from getaddrinfo_a() --- diff --git a/src/dnslookup.c b/src/dnslookup.c index c525bf8..43db4e0 100644 --- a/src/dnslookup.c +++ b/src/dnslookup.c @@ -286,7 +286,11 @@ static void impl_launch_query(struct DNSRequest *req) return; failed: - log_warning("dns: getaddrinfo_a(%s)=%d", req->name, res); + if (res == EAI_SYSTEM) + log_warning("dns: getaddrinfo_a(%s)=%d, errno=%d (%s)", + req->name, res, errno, strerror(errno)); + else + log_warning("dns: getaddrinfo_a(%s)=%d", req->name, res); list_del(&grq->node); free(grq); failed2: