summaryrefslogtreecommitdiffstats
path: root/avahi-daemon/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'avahi-daemon/main.c')
-rw-r--r--avahi-daemon/main.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c
index 12a721a..096d0aa 100644
--- a/avahi-daemon/main.c
+++ b/avahi-daemon/main.c
@@ -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;