]> git.meshlink.io Git - catta/commitdiff
fix querier instantiation
authorLennart Poettering <lennart@poettering.net>
Sun, 25 Sep 2005 23:46:25 +0000 (23:46 +0000)
committerLennart Poettering <lennart@poettering.net>
Sun, 25 Sep 2005 23:46:25 +0000 (23:46 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@629 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/browse.c
avahi-core/multicast-lookup.c
avahi-core/querier.c

index e8494ae80be978ba999c96ba9cd1db9809b7aed3..64680b7630116a92cf36082b081af1a553360c42 100644 (file)
@@ -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) {
index 641ee4da939a9d8af49a7f3e7efa9e4079230617..d46f94099dc02b8e23aa3bf8def276befba0de82 100644 (file)
@@ -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);
index 51b2ce663233c8942d53e1d6c1d75c644aad5779..a58d387743c5ebe902380f83e069d451ca77f145 100644 (file)
@@ -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);
 }