]> git.meshlink.io Git - catta/commitdiff
core: don't warn if we try to remove a querier that is already gone
authorLennart Poettering <lennart@poettering.net>
Mon, 28 Jun 2010 20:58:44 +0000 (22:58 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 28 Jun 2010 20:59:22 +0000 (22:59 +0200)
This might happen if an iface goes away while we are querying.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=548952

avahi-core/querier.c

index 2b1c919b16d28a77db1a98d5af4306a1c7defbe9..d9dc1fb0fbfd6f15c1c72aa5923e7ab188b1d550 100644 (file)
@@ -146,11 +146,10 @@ void avahi_querier_add(AvahiInterface *i, AvahiKey *key, struct timeval *ret_cti
 void avahi_querier_remove(AvahiInterface *i, AvahiKey *key) {
     AvahiQuerier *q;
 
-    if (!(q = avahi_hashmap_lookup(i->queriers_by_key, key)) || q->n_used <= 0) {
-        /* There was no querier for this RR key, or it wasn't referenced by anyone */
-        avahi_log_warn(__FILE__": querier_remove() called but no querier to remove.");
+    /* There was no querier for this RR key, or it wasn't referenced
+     * by anyone. */
+    if (!(q = avahi_hashmap_lookup(i->queriers_by_key, key)) || q->n_used <= 0)
         return;
-    }
 
     if ((--q->n_used) <= 0) {