From 5622a8298f55b77a7bd202f6f2d7cd6d9a622eef Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 22 Aug 2006 01:48:48 +0000 Subject: [PATCH] fix AVAHI_SERVER_REGISTERING handling git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1259 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-daemon/main.c | 15 ++++++++++----- 1 file 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; -- 2.39.5