Blame SOURCES/0009-Fix-not-publishing-entries-if-a-probing-interface-is.patch

850466
From 8d7edcaf79ce5a439f40ca50c020a097cbe8d8eb Mon Sep 17 00:00:00 2001
850466
From: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
850466
Date: Wed, 25 Nov 2015 16:31:39 +0100
850466
Subject: [PATCH] Fix not publishing entries if a probing interface is removed.
850466
850466
If an interface is no longer relevant for mDNS while an announcer was
850466
probing on this interface, the announcer is removed but the n_probing
850466
counter of the entry group is not updated.   So n_probing would never
850466
reach zero and the entry group would stay  forever in the REGISTERING
850466
state.  If the entry group is for a host resource record,  the daemon
850466
could stay in the registering phase forever and would not publish any
850466
service.
850466
850466
Fix that by decrementing group->n_probing when removing an announcer
850466
in the PROBING state. Also handle the case where the entry group was
850466
waiting for the deleted announcer to become registered.
850466
850466
(cherry-picked from PR https://github.com/lathiat/avahi/pull/39)
850466
850466
Resolves: #1222646
850466
---
850466
 avahi-core/announce.c | 6 ++++++
850466
 1 file changed, 6 insertions(+)
850466
850466
diff --git a/avahi-core/announce.c b/avahi-core/announce.c
850466
index ccdbf15..05053cf 100644
850466
--- a/avahi-core/announce.c
850466
+++ b/avahi-core/announce.c
850466
@@ -44,6 +44,12 @@ static void remove_announcer(AvahiServer *s, AvahiAnnouncer *a) {
850466
     AVAHI_LLIST_REMOVE(AvahiAnnouncer, by_interface, a->interface->announcers, a);
850466
     AVAHI_LLIST_REMOVE(AvahiAnnouncer, by_entry, a->entry->announcers, a);
850466
 
850466
+    if (a->state == AVAHI_PROBING && a->entry->group) {
850466
+	assert(a->entry->group->n_probing);
850466
+	a->entry->group->n_probing--;
850466
+	avahi_s_entry_group_check_probed(a->entry->group, 1);
850466
+    }
850466
+
850466
     avahi_free(a);
850466
 }
850466
 
850466
-- 
850466
2.7.4
850466