summaryrefslogtreecommitdiffstats
path: root/avahi-core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-09-25 23:46:25 +0000
committerLennart Poettering <lennart@poettering.net>2005-09-25 23:46:25 +0000
commitb2839754a3d1e15a3009561e69b41608014af0cb (patch)
tree7c8a2bcf55ba0351a38406f0b78c0aedc585a0db /avahi-core
parent7e4e16f9527850d416bc2d2d4d20711aadaf76b6 (diff)
fix querier instantiation
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@629 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core')
-rw-r--r--avahi-core/browse.c3
-rw-r--r--avahi-core/multicast-lookup.c1
-rw-r--r--avahi-core/querier.c3
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);
}