]> git.meshlink.io Git - catta/commitdiff
* fix a bug found by Sebastien triggered be repeatedly resetting and commiting an...
authorLennart Poettering <lennart@poettering.net>
Wed, 28 Sep 2005 01:12:34 +0000 (01:12 +0000)
committerLennart Poettering <lennart@poettering.net>
Wed, 28 Sep 2005 01:12:34 +0000 (01:12 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@641 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/server.c

index dc63c67da75d1dc0eb569dcf62686ed492dabe69..c4545c6327b834830a1427372f0a7eb8ed46a8da 100644 (file)
@@ -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);
 }