]> granicus.if.org Git - pgbouncer/commitdiff
dnslookup: Consistently use log_error during impl_init()
authorPeter Eisentraut <peter@eisentraut.org>
Fri, 27 Sep 2019 07:30:49 +0000 (09:30 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Fri, 27 Sep 2019 07:30:49 +0000 (09:30 +0200)
This was done inconsistently between the different backends.  Some
used log_warning() for conditions that would ultimately be fatal.

src/dnslookup.c

index 1dbca6427c5b7035784496a9dfcc844bbb3489c3..6fefc71a848a0095d3e9cecc76af5ade24014d25 100644 (file)
@@ -371,7 +371,7 @@ static bool impl_init(struct DNSContext *ctx)
 {
        ctx->edns = evdns_base_new(NULL, 1);
        if (!ctx->edns) {
-               log_warning("evdns_base_new failed");
+               log_error("evdns_base_new failed");
                return false;
        }
        return true;
@@ -511,7 +511,7 @@ static bool impl_init(struct DNSContext *ctx)
        /* i/o callback setup */
        fd = dns_open(dctx);
        if (fd <= 0) {
-               log_warning("dns_open failed: fd=%d", fd);
+               log_error("dns_open failed: fd=%d", fd);
                return false;
        }
        event_set(&udns->ev_io, fd, EV_READ | EV_PERSIST, udns_io_cb, ctx);