From: Ronnie sahlberg Date: Tue, 10 Apr 2007 02:39:25 +0000 (+1000) Subject: move the checking of the CONNECT_WAIT flag into the start method for tcp X-Git-Tag: tevent-0.9.20~348^2~2953^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=91c39b485237d093362bcfcabcdd51b32bb6a371;p=thirdparty%2Fsamba.git move the checking of the CONNECT_WAIT flag into the start method for tcp (This used to be ctdb commit 44f3e4456d931af642192e034f84c961ab1fdcf0) --- diff --git a/ctdb/common/ctdb.c b/ctdb/common/ctdb.c index 0add6f1d82c..d8b4859232d 100644 --- a/ctdb/common/ctdb.c +++ b/ctdb/common/ctdb.c @@ -346,13 +346,5 @@ int ctdb_start(struct ctdb_context *ctdb) return ctdbd_start(ctdb); } - res = ctdb->methods->start(ctdb); - - if (ctdb->flags&CTDB_FLAG_CONNECT_WAIT) { - /* wait until all nodes are connected (should not be needed - outide of test code) */ - ctdb_connect_wait(ctdb); - } - - return res; + return ctdb->methods->start(ctdb); } diff --git a/ctdb/common/ctdb_daemon.c b/ctdb/common/ctdb_daemon.c index 71fc8f47f3f..dc1e1477163 100644 --- a/ctdb/common/ctdb_daemon.c +++ b/ctdb/common/ctdb_daemon.c @@ -35,12 +35,6 @@ static void ctdb_main_loop(struct ctdb_context *ctdb) { ctdb->methods->start(ctdb); - if (ctdb->flags&CTDB_FLAG_CONNECT_WAIT) { - /* wait until all nodes are connected (should not be needed - outide of test code) */ - ctdb_connect_wait(ctdb); - } - /* go into a wait loop to allow other nodes to complete */ event_loop_wait(ctdb->ev); diff --git a/ctdb/tcp/tcp_init.c b/ctdb/tcp/tcp_init.c index 0058e7ad856..0ab12790d49 100644 --- a/ctdb/tcp/tcp_init.c +++ b/ctdb/tcp/tcp_init.c @@ -46,6 +46,12 @@ int ctdb_tcp_start(struct ctdb_context *ctdb) ctdb_tcp_node_connect, node); } + if (ctdb->flags&CTDB_FLAG_CONNECT_WAIT) { + /* wait until all nodes are connected (should not be needed + outide of test code) */ + ctdb_connect_wait(ctdb); + } + return 0; }