]> git.meshlink.io Git - catta/commitdiff
* Fix service resolving when a service is updated
authorLennart Poettering <lennart@poettering.net>
Sun, 28 Aug 2005 01:11:13 +0000 (01:11 +0000)
committerLennart Poettering <lennart@poettering.net>
Sun, 28 Aug 2005 01:11:13 +0000 (01:11 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@461 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/resolve-service.c

index 173c34b192f39390ffe4cced34addab740aea77f..6dbca40ee2726df25f5a78bc982973b383b6563a 100644 (file)
@@ -157,8 +157,16 @@ static void record_browser_callback(AvahiSRecordBrowser*rr, AvahiIfIndex interfa
                 if (!r->srv_record) {
                     r->srv_record = avahi_record_ref(record);
                     changed = 1;
-                    
-                    assert(!r->record_browser_a && !r->record_browser_aaaa);
+
+                    if (r->record_browser_a) {
+                        avahi_s_record_browser_free(r->record_browser_a);
+                        r->record_browser_a = NULL;
+                    }
+
+                    if (r->record_browser_aaaa) {
+                        avahi_s_record_browser_free(r->record_browser_aaaa);
+                        r->record_browser_aaaa = NULL;
+                    }
                     
                     if (r->address_protocol == AVAHI_PROTO_INET || r->address_protocol == AVAHI_PROTO_UNSPEC) {
                         AvahiKey *k = avahi_key_new(r->srv_record->data.srv.name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_A);