]> git.meshlink.io Git - catta/commitdiff
* avahi-core/entry.c: Correctly reset register_time_event when leaving the REGISTERI...
authorTrent Lloyd <lathiat@bur.st>
Fri, 30 Mar 2007 19:20:29 +0000 (19:20 +0000)
committerTrent Lloyd <lathiat@bur.st>
Fri, 30 Mar 2007 19:20:29 +0000 (19:20 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1400 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/entry.c

index 9e9c0dd66393fa312ef02366b6b57de6a4473de7..e2a7c6c270b84d719e10b1bff898b94937ebe852 100644 (file)
@@ -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);
 }