diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-01-28 08:30:36 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-01-28 08:45:17 +0900 |
commit | 18230451c03a6d20141efbc85341b6a5c6809077 (patch) | |
tree | 74ec1ba3f7e5afe9f5da687b4f3c77ad3172734d /src/resolve/resolved-dns-transaction.c | |
parent | e6d31fc97af92ef59741b3948c984a7d1b2b70f3 (diff) | |
download | systemd-18230451c03a6d20141efbc85341b6a5c6809077.tar.gz |
resolve: make dns_stream_new() take on_packet and complete callbacks
And make on_packet callback mandatory.
Diffstat (limited to 'src/resolve/resolved-dns-transaction.c')
-rw-r--r-- | src/resolve/resolved-dns-transaction.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c index 0cf9912712..20d257bbf3 100644 --- a/src/resolve/resolved-dns-transaction.c +++ b/src/resolve/resolved-dns-transaction.c @@ -754,7 +754,8 @@ static int dns_transaction_emit_tcp(DnsTransaction *t) { if (fd < 0) return fd; - r = dns_stream_new(t->scope->manager, &s, type, t->scope->protocol, fd, &sa, stream_timeout_usec); + r = dns_stream_new(t->scope->manager, &s, type, t->scope->protocol, fd, &sa, + on_stream_packet, on_stream_complete, stream_timeout_usec); if (r < 0) return r; @@ -777,9 +778,6 @@ static int dns_transaction_emit_tcp(DnsTransaction *t) { t->server->stream = dns_stream_ref(s); } - s->complete = on_stream_complete; - s->on_packet = on_stream_packet; - /* The interface index is difficult to determine if we are * connecting to the local host, hence fill this in right away * instead of determining it from the socket */ |