diff options
author | Lennart Poettering <lennart@poettering.net> | 2006-08-22 01:48:48 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2006-08-22 01:48:48 +0000 |
commit | 5622a8298f55b77a7bd202f6f2d7cd6d9a622eef (patch) | |
tree | 2ba9f173282264b730e6f742c27c8c560cece5da | |
parent | c1e5b725e8e769c8ac1f5df97aac53896b05af43 (diff) |
fix AVAHI_SERVER_REGISTERING handling
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1259 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
-rw-r--r-- | avahi-daemon/main.c | 15 |
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; |