From: Trent Lloyd Date: Fri, 30 Mar 2007 19:20:29 +0000 (+0000) Subject: * avahi-core/entry.c: Correctly reset register_time_event when leaving the REGISTERI... X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=116c6cd8c1738e7312cc84afd5e6d3a1b19b5d1f;p=catta * avahi-core/entry.c: Correctly reset register_time_event when leaving the REGISTERING state, not just when calling _reset git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1400 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-core/entry.c b/avahi-core/entry.c index 9e9c0dd..e2a7c6c 100644 --- a/avahi-core/entry.c +++ b/avahi-core/entry.c @@ -1014,6 +1014,11 @@ void avahi_s_entry_group_change_state(AvahiSEntryGroup *g, AvahiEntryGroupState if (avahi_age(&g->established_at) > 5000000) g->n_register_try = 0; + } else if (g->state == AVAHI_ENTRY_GROUP_REGISTERING) { + if (g->register_time_event) { + avahi_time_event_free(g->register_time_event); + g->register_time_event = NULL; + } } if (state == AVAHI_ENTRY_GROUP_ESTABLISHED) @@ -1153,15 +1158,8 @@ void avahi_s_entry_group_reset(AvahiSEntryGroup *g) { } 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->n_probing = 0; - gettimeofday(&g->register_time, NULL); - avahi_s_entry_group_change_state(g, AVAHI_ENTRY_GROUP_UNCOMMITED); }