X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fentry.c;h=749fae5a4bce6adff4fa5333e39c2b1385ac6c99;hb=f7e3b4fab6ba1bc98c6dbe859ccdef4fde6c5db2;hp=e2a7c6c270b84d719e10b1bff898b94937ebe852;hpb=116c6cd8c1738e7312cc84afd5e6d3a1b19b5d1f;p=catta diff --git a/avahi-core/entry.c b/avahi-core/entry.c index e2a7c6c..749fae5 100644 --- a/avahi-core/entry.c +++ b/avahi-core/entry.c @@ -161,6 +161,11 @@ static int check_record_conflict(AvahiServer *s, AvahiIfIndex interface, AvahiPr if ((flags & AVAHI_PUBLISH_ALLOW_MULTIPLE) && (e->flags & AVAHI_PUBLISH_ALLOW_MULTIPLE) ) continue; + if (avahi_record_equal_no_ttl(r, e->record)) { + /* The records are the same, not a conflict in any case */ + continue; + } + if ((interface <= 0 || e->interface <= 0 || e->interface == interface) && @@ -1082,6 +1087,8 @@ void avahi_s_entry_group_free(AvahiSEntryGroup *g) { g->server->need_group_cleanup = 1; g->server->need_entry_cleanup = 1; + + avahi_cleanup_dead_entries(g->server); } static void entry_group_commit_real(AvahiSEntryGroup *g) { @@ -1161,6 +1168,8 @@ void avahi_s_entry_group_reset(AvahiSEntryGroup *g) { g->n_probing = 0; avahi_s_entry_group_change_state(g, AVAHI_ENTRY_GROUP_UNCOMMITED); + + avahi_cleanup_dead_entries(g->server); } int avahi_entry_is_commited(AvahiEntry *e) {