]> git.meshlink.io Git - catta/commitdiff
fix AVAHI_SERVER_REGISTERING handling
authorLennart Poettering <lennart@poettering.net>
Tue, 22 Aug 2006 01:48:48 +0000 (01:48 +0000)
committerLennart Poettering <lennart@poettering.net>
Tue, 22 Aug 2006 01:48:48 +0000 (01:48 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1259 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-daemon/main.c

index 12a721a7a25fcd6b7f276f61b0194f3b4f3746df..096d0aab7639e0489912aa6864d70f5f38fe3d7a 100644 (file)
@@ -286,18 +286,17 @@ static void server_callback(AvahiServer *s, AvahiServerState state, void *userda
         case AVAHI_SERVER_COLLISION: {
             char *n;
             
+            avahi_set_proc_title("%s: collision", argv0);
+            
             static_service_remove_from_server();
             static_hosts_remove_from_server();
-            
             remove_dns_server_entry_groups();
-            
+
             n = avahi_alternative_host_name(avahi_server_get_host_name(s));
             avahi_log_warn("Host name conflict, retrying with <%s>", n);
             avahi_server_set_host_name(s, n);
             avahi_free(n);
 
-            avahi_set_proc_title("%s: collision", argv0);
-            
             break;
         }
 
@@ -308,8 +307,14 @@ static void server_callback(AvahiServer *s, AvahiServerState state, void *userda
             break;
 
         case AVAHI_SERVER_REGISTERING:
-            avahi_set_proc_title("%s: registering [%s]", argv0, avahi_server_get_host_name_fqdn(s));
 
+            avahi_set_proc_title("%s: registering [%s]", argv0, avahi_server_get_host_name_fqdn(s));
+            
+            static_service_remove_from_server();
+            static_hosts_remove_from_server();
+            remove_dns_server_entry_groups();
+            
+            break;
 
         case AVAHI_SERVER_INVALID:
             break;