From: Lennart Poettering Date: Mon, 28 Jun 2010 20:58:44 +0000 (+0200) Subject: core: don't warn if we try to remove a querier that is already gone X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=955093014c992318a1b52758a8e01627bb0a82f2;p=catta core: don't warn if we try to remove a querier that is already gone This might happen if an iface goes away while we are querying. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=548952 --- diff --git a/avahi-core/querier.c b/avahi-core/querier.c index 2b1c919..d9dc1fb 100644 --- a/avahi-core/querier.c +++ b/avahi-core/querier.c @@ -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) {