chiark / gitweb /
resolved: don't abort if a transaction is aborted because its scope is removed
authorLennart Poettering <lennart@poettering.net>
Tue, 5 Aug 2014 15:02:23 +0000 (17:02 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 5 Aug 2014 15:02:46 +0000 (17:02 +0200)
src/resolve/resolved-dns-transaction.c

index 53d6e18dc53b492d72cae392147c546a2d09f39d..a2e4f2ce952e9a292146fbc3f020efdc111be8b5 100644 (file)
@@ -147,7 +147,9 @@ void dns_transaction_complete(DnsTransaction *t, DnsTransactionState state) {
 
         assert(t);
         assert(!IN_SET(state, DNS_TRANSACTION_NULL, DNS_TRANSACTION_PENDING));
-        assert(IN_SET(t->state, DNS_TRANSACTION_NULL, DNS_TRANSACTION_PENDING));
+
+        if (!IN_SET(t->state, DNS_TRANSACTION_NULL, DNS_TRANSACTION_PENDING))
+                return;
 
         /* Note that this call might invalidate the query. Callers
          * should hence not attempt to access the query or transaction
@@ -443,7 +445,7 @@ int dns_transaction_go(DnsTransaction *t) {
 
         dns_transaction_stop(t);
 
-        log_debug("Beginning transaction on scope %s on %s/%s",
+        log_debug("Excercising transaction on scope %s on %s/%s",
                   dns_protocol_to_string(t->scope->protocol),
                   t->scope->link ? t->scope->link->name : "*",
                   t->scope->family == AF_UNSPEC ? "*" : af_to_name(t->scope->family));