diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-12-15 21:01:06 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-12-17 10:02:36 +0900 |
commit | f2935c77c63afa25cd38577477cb753a96b28513 (patch) | |
tree | aba6342a4de0fcef65462958082a634662b45490 /src | |
parent | netdev: use typesafe resolve_getaddrinfo() in wireguard.c (diff) | |
download | systemd-f2935c77c63afa25cd38577477cb753a96b28513.tar.gz systemd-f2935c77c63afa25cd38577477cb753a96b28513.tar.bz2 systemd-f2935c77c63afa25cd38577477cb753a96b28513.zip |
socket-proxyd: use typesafe resolve_getaddrinfo()
Diffstat (limited to 'src')
-rw-r--r-- | src/socket-proxy/socket-proxyd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c index 47a2156aa..f882a665a 100644 --- a/src/socket-proxy/socket-proxyd.c +++ b/src/socket-proxy/socket-proxyd.c @@ -22,6 +22,7 @@ #include "parse-util.h" #include "path-util.h" #include "pretty-print.h" +#include "resolve-private.h" #include "set.h" #include "socket-util.h" #include "string-util.h" @@ -347,9 +348,7 @@ fail: return 0; /* ignore errors, continue serving */ } -static int resolve_cb(sd_resolve_query *q, int ret, const struct addrinfo *ai, void *userdata) { - Connection *c = userdata; - +static int resolve_handler(sd_resolve_query *q, int ret, const struct addrinfo *ai, Connection *c) { assert(q); assert(c); @@ -401,7 +400,7 @@ static int resolve_remote(Connection *c) { } log_debug("Looking up address info for %s:%s", node, service); - r = sd_resolve_getaddrinfo(c->context->resolve, &c->resolve_query, node, service, &hints, resolve_cb, c); + r = resolve_getaddrinfo(c->context->resolve, &c->resolve_query, node, service, &hints, resolve_handler, NULL, c); if (r < 0) { log_error_errno(r, "Failed to resolve remote host: %m"); goto fail; |