From c1e5b725e8e769c8ac1f5df97aac53896b05af43 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 22 Aug 2006 01:48:13 +0000 Subject: fix logic of AVAHI_SERVER_REGISTERING state handling. Many clients assumed that this state would follow only on a AVAHI_SERVER_COLLISION state. However, this is not true, hence we need to handle this state transition, too. Mostly the same as we already handle AVAHI_SERVER_COLLISION. git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1258 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-utils/avahi-publish.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'avahi-utils') diff --git a/avahi-utils/avahi-publish.c b/avahi-utils/avahi-publish.c index 9ca2df2..77dc422 100644 --- a/avahi-utils/avahi-publish.c +++ b/avahi-utils/avahi-publish.c @@ -189,7 +189,11 @@ static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UN if (config->verbose) fprintf(stderr, "Host name conflict\n"); + + /* Fall through */ + case AVAHI_CLIENT_S_REGISTERING: + if (entry_group) { avahi_entry_group_free(entry_group); entry_group = NULL; @@ -200,9 +204,9 @@ static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UN if (config->verbose) fprintf(stderr, "Waiting for daemon ...\n"); + break; - case AVAHI_CLIENT_S_REGISTERING: ; } } -- cgit