diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-08-06 16:32:55 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-08-11 15:06:22 +0200 |
commit | 82bd6dddc4a363a9c3c6f41eb46eb171a80dca27 (patch) | |
tree | 62c653d001a821d5101e312bcc72076acc4ab019 /src/resolve/resolved-bus.c | |
parent | 818f766b12e025683cf4fed12b3da2a025bb0b31 (diff) |
resolved: destroy outstanding queries if the clients that initiated them die
Diffstat (limited to 'src/resolve/resolved-bus.c')
-rw-r--r-- | src/resolve/resolved-bus.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c index 89a9300dfb..6a3343e000 100644 --- a/src/resolve/resolved-bus.c +++ b/src/resolve/resolved-bus.c @@ -319,6 +319,10 @@ static int bus_method_resolve_hostname(sd_bus *bus, sd_bus_message *message, voi q->request_hostname = hostname; q->complete = bus_method_resolve_hostname_complete; + r = dns_query_bus_track(q, bus, message); + if (r < 0) + return r; + r = dns_query_go(q); if (r < 0) { dns_query_free(q); @@ -457,6 +461,10 @@ static int bus_method_resolve_address(sd_bus *bus, sd_bus_message *message, void memcpy(&q->request_address, d, sz); q->complete = bus_method_resolve_address_complete; + r = dns_query_bus_track(q, bus, message); + if (r < 0) + return r; + r = dns_query_go(q); if (r < 0) { dns_query_free(q); @@ -593,6 +601,10 @@ static int bus_method_resolve_record(sd_bus *bus, sd_bus_message *message, void q->request_hostname = name; q->complete = bus_method_resolve_record_complete; + r = dns_query_bus_track(q, bus, message); + if (r < 0) + return r; + r = dns_query_go(q); if (r < 0) { dns_query_free(q); |