From f5d4215d93887fda552b8f5f52ea506e01d9a748 Mon Sep 17 00:00:00 2001 From: jan Date: Thu, 20 Aug 2015 15:58:37 +0200 Subject: [PATCH] fix backend #705 Avoiding a state change callback while still constructing catta server, so the callback can expect to have a readily constructed catta server available. This changes the behaviour and catta will only change into running state when at least one network interface is found and used. --- src/server.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/server.c b/src/server.c index fffbfdf..b397196 100644 --- a/src/server.c +++ b/src/server.c @@ -1220,7 +1220,7 @@ static void register_stuff(CattaServer *s) { assert(s); server_set_state(s, CATTA_SERVER_REGISTERING); - s->n_host_rr_pending ++; /** Make sure that the state isn't changed tp CATTA_SERVER_RUNNING too early */ + s->n_host_rr_pending ++; /** Make sure that the state isn't changed to CATTA_SERVER_RUNNING too early */ register_hinfo(s); register_browse_domain(s); @@ -1228,9 +1228,6 @@ static void register_stuff(CattaServer *s) { assert(s->n_host_rr_pending > 0); s->n_host_rr_pending --; - - if (s->n_host_rr_pending == 0) - server_set_state(s, CATTA_SERVER_RUNNING); } static void update_fqdn(CattaServer *s) { -- 2.39.5