diff options
author | David Härdeman <david@hardeman.nu> | 2020-07-01 16:50:45 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2020-07-01 16:50:45 +0200 |
commit | dc93ade1436f619a90a9eee7d98ff91ecaccb6ab (patch) | |
tree | 7437c9ba5cb2a51be24d9e4a37605248edb983ba /minecproxy/signal-handler.c | |
parent | 86727730b8e4cfce2a4ecf2e787c8bf7f57af924 (diff) |
Return some sanity to DNS handling
Diffstat (limited to 'minecproxy/signal-handler.c')
-rw-r--r-- | minecproxy/signal-handler.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/minecproxy/signal-handler.c b/minecproxy/signal-handler.c index 5369670..23d72fa 100644 --- a/minecproxy/signal-handler.c +++ b/minecproxy/signal-handler.c @@ -9,7 +9,6 @@ #include "uring.h" #include "server.h" #include "server-config.h" -#include "config-parser.h" #include "igmp.h" #include "announce.h" #include "idle.h" @@ -46,23 +45,13 @@ static void signalfd_read(struct uring_task *task, int res) si = &sia[i]; switch (si->si_signo) { case SIGUSR1: { - struct dns_async *dns; - debug(DBG_SIG, "Got a SIGUSR1"); if (si->si_code != SI_ASYNCNL || !si->si_ptr) { error("SIGUSR1: unexpected values in siginfo"); goto out; } - dns = si->si_ptr; - if (!dns->cb) { - error("DNS callback not set (%p)", dns); - goto out; - } - - debug(DBG_DNS, "DNS lookup complete, dns: %p, dns->cb: %p", dns, - dns->cb); - dns->cb(dns); + server_cfg_async_dns_result(si->si_ptr); break; } |