From 955093014c992318a1b52758a8e01627bb0a82f2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 28 Jun 2010 22:58:44 +0200 Subject: [PATCH] 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 --- avahi-core/querier.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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) { -- 2.39.5