From: Lennart Poettering Date: Wed, 28 Sep 2005 01:12:34 +0000 (+0000) Subject: * fix a bug found by Sebastien triggered be repeatedly resetting and commiting an... X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=5de0404511175a1c294229b1cbda1c51a7a5eb8c;p=catta * fix a bug found by Sebastien triggered be repeatedly resetting and commiting an entry group git-svn-id: file:///home/lennart/svn/public/avahi/trunk@641 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-core/server.c b/avahi-core/server.c index dc63c67..c4545c6 100644 --- a/avahi-core/server.c +++ b/avahi-core/server.c @@ -2331,26 +2331,23 @@ void avahi_s_entry_group_reset(AvahiSEntryGroup *g) { AvahiEntry *e; assert(g); - if (g->register_time_event) { - avahi_time_event_free(g->register_time_event); - g->register_time_event = NULL; - } - for (e = g->entries; e; e = e->by_group_next) { if (!e->dead) { avahi_goodbye_entry(g->server, e, 1); e->dead = 1; } } + g->server->need_entry_cleanup = 1; if (g->register_time_event) { avahi_time_event_free(g->register_time_event); g->register_time_event = NULL; } - g->server->need_entry_cleanup = 1; g->n_probing = 0; + gettimeofday(&g->register_time, NULL); + avahi_s_entry_group_change_state(g, AVAHI_ENTRY_GROUP_UNCOMMITED); }