diff options
Diffstat (limited to 'avahi-core')
-rw-r--r-- | avahi-core/browse.c | 3 | ||||
-rw-r--r-- | avahi-core/multicast-lookup.c | 1 | ||||
-rw-r--r-- | avahi-core/querier.c | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/avahi-core/browse.c b/avahi-core/browse.c index e8494ae..64680b7 100644 --- a/avahi-core/browse.c +++ b/avahi-core/browse.c @@ -569,9 +569,6 @@ void avahi_s_record_browser_cancel(AvahiSRecordBrowser *b) { avahi_time_event_free(b->defer_time_event); b->defer_time_event = NULL; } - - - } void avahi_s_record_browser_free(AvahiSRecordBrowser *b) { diff --git a/avahi-core/multicast-lookup.c b/avahi-core/multicast-lookup.c index 641ee4d..d46f940 100644 --- a/avahi-core/multicast-lookup.c +++ b/avahi-core/multicast-lookup.c @@ -110,6 +110,7 @@ AvahiMulticastLookup *avahi_multicast_lookup_new( AVAHI_LLIST_PREPEND(AvahiMulticastLookup, lookups, e->lookups, l); avahi_querier_add_for_all(e->server, interface, protocol, l->key, &ctime); + l->queriers_added = 1; /* add a second */ avahi_timeval_add(&ctime, 1000000); diff --git a/avahi-core/querier.c b/avahi-core/querier.c index 51b2ce6..a58d387 100644 --- a/avahi-core/querier.c +++ b/avahi-core/querier.c @@ -81,7 +81,7 @@ void avahi_querier_add(AvahiInterface *i, AvahiKey *key, struct timeval *ret_cti assert(i); assert(key); - + if ((q = avahi_hashmap_lookup(i->queriers_by_key, key))) { /* Someone is already browsing for records of this RR key */ q->n_used++; @@ -126,6 +126,7 @@ void avahi_querier_remove(AvahiInterface *i, AvahiKey *key) { } assert(q->n_used >= 1); + if ((--q->n_used) <= 0) avahi_querier_free(q); } |