for (i = avahi_hashmap_lookup(s->entries_by_key, e->record->key); i; i = i->by_key_next) {
- if (i == e)
+ if ((i == e) || (i->dead))
continue;
if (!avahi_record_equal_no_ttl(i->record, e->record))
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) {
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) {
avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_ID, slot->id);
}
-static void cleanup_dead(AvahiServer *s) {
- assert(s);
-
- avahi_cleanup_dead_entries(s);
- avahi_browser_cleanup(s);
-}
-
static void mcast_socket_event(AvahiWatch *w, int fd, AvahiWatchEvent events, void *userdata) {
AvahiServer *s = userdata;
AvahiAddress dest, src;
avahi_dns_packet_free(p);
- cleanup_dead(s);
+ avahi_cleanup_dead_entries(s);
}
}
dispatch_legacy_unicast_packet(s, p);
avahi_dns_packet_free(p);
- cleanup_dead(s);
+ avahi_cleanup_dead_entries(s);
}
}