chiark / gitweb /
resolved: don't override zone item state after starting the probe
authorLennart Poettering <lennart@poettering.net>
Tue, 5 Aug 2014 02:16:26 +0000 (04:16 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 5 Aug 2014 02:17:12 +0000 (04:17 +0200)
After all, the probe might be finished immeidately (due to resources,
...), and we shouldn't then set the state back to probing.

src/resolve/resolved-dns-zone.c

index 649cc5c..04a4674 100644 (file)
@@ -279,14 +279,14 @@ int dns_zone_put(DnsZone *z, DnsScope *s, DnsResourceRecord *rr, bool probe) {
                 if (established)
                         i->state = DNS_ZONE_ITEM_ESTABLISHED;
                 else {
+                        i->state = DNS_ZONE_ITEM_PROBING;
+
                         r = dns_zone_item_probe_start(i);
                         if (r < 0) {
                                 dns_zone_item_remove_and_free(z, i);
                                 i = NULL;
                                 return r;
                         }
-
-                        i->state = DNS_ZONE_ITEM_PROBING;
                 }
         } else
                 i->state = DNS_ZONE_ITEM_ESTABLISHED;