From: Marko Kreen Date: Tue, 2 Nov 2010 14:10:43 +0000 (+0200) Subject: dnslookup: minor cleanups X-Git-Tag: pgbouncer_1_4_rc3~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97ca689ac6f2d31449d625a852ef12521a55b2ad;p=pgbouncer dnslookup: minor cleanups --- diff --git a/include/dnslookup.h b/include/dnslookup.h index 3581794..38e529a 100644 --- a/include/dnslookup.h +++ b/include/dnslookup.h @@ -36,7 +36,7 @@ struct DNSContext; -typedef void (*adns_callback_f)(void *arg, const struct sockaddr *ai, int salen); +typedef void (*adns_callback_f)(void *arg, const struct sockaddr *sa, int salen); struct DNSContext *adns_create_context(void); void adns_reload(struct DNSContext *ctx); diff --git a/src/dnslookup.c b/src/dnslookup.c index 1bca94f..40a2933 100644 --- a/src/dnslookup.c +++ b/src/dnslookup.c @@ -108,7 +108,6 @@ static void dns_signal(int f, short ev, void *arg) /* got one */ list_del(&rq->node); - rq->req->done = true; got_result_gai(e, rq->gairq.ar_result, rq->req); free(rq); } @@ -196,8 +195,9 @@ static bool impl_init(struct DNSContext *ctx) static void impl_launch_query(struct DNSRequest *req) { struct evdns_getaddrinfo_request *gai_req; + struct evdns_base *dns = req->ctx->edns; - gai_req = evdns_getaddrinfo(req->ctx->edns, req->name, NULL, NULL, got_result_gai, req); + gai_req = evdns_getaddrinfo(dns, req->name, NULL, NULL, got_result_gai, req); log_noise("dns: evdns_getaddrinfo(%s)=%p", req->name, gai_req); }