From 77c7bbf4c851ba719a91b193bdb602c43f1418d5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 28 Aug 2005 01:11:13 +0000 Subject: [PATCH] * Fix service resolving when a service is updated git-svn-id: file:///home/lennart/svn/public/avahi/trunk@461 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/resolve-service.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/avahi-core/resolve-service.c b/avahi-core/resolve-service.c index 173c34b..6dbca40 100644 --- a/avahi-core/resolve-service.c +++ b/avahi-core/resolve-service.c @@ -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); -- 2.39.5