summaryrefslogtreecommitdiffstats
path: root/ctdb/tcp/tcp_connect.c
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2012-12-04 14:28:06 +1100
committerAmitay Isaacs <amitay@gmail.com>2013-01-07 10:35:39 +1100
commit6fbd3ea2c2d516084c4ef887af3a6ac048bd2eba (patch)
treed03a5af9b1306f5b28578e81c877b9bf0b9df3de /ctdb/tcp/tcp_connect.c
parent80a2bb84e7d04f4ee3b3369f734b80dce184ad72 (diff)
downloadsamba-6fbd3ea2c2d516084c4ef887af3a6ac048bd2eba.tar.gz
samba-6fbd3ea2c2d516084c4ef887af3a6ac048bd2eba.tar.xz
samba-6fbd3ea2c2d516084c4ef887af3a6ac048bd2eba.zip
ctdbd: Initialise the node flags in just one place
Currently flags are initialised in 2 places. One of them is in ctdb_tcp_listen_automatic(), which just seems wrong. This makes the code easier to follow by just doing it in ctdb_start_daemon(). This means that the flags are now initialised later than previously. However, it is still done before the transport is started and before clients can connect. In future it might make sense to do a similar thing with setting the PNN. However, the current optimisation is reasonably obvious... Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 2bbee8ac23ad5b7adf7122d8c91d5f0d54582507)
Diffstat (limited to 'ctdb/tcp/tcp_connect.c')
-rw-r--r--ctdb/tcp/tcp_connect.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c
index 26a280e30b..93111f37aa 100644
--- a/ctdb/tcp/tcp_connect.c
+++ b/ctdb/tcp/tcp_connect.c
@@ -374,21 +374,10 @@ static int ctdb_tcp_listen_automatic(struct ctdb_context *ctdb)
ctdb->address.address,
ctdb->address.port);
ctdb->pnn = ctdb->nodes[i]->pnn;
- ctdb->nodes[i]->flags &= ~NODE_FLAGS_DISCONNECTED;
DEBUG(DEBUG_INFO,("ctdb chose network address %s:%u pnn %u\n",
ctdb->address.address,
ctdb->address.port,
ctdb->pnn));
- /* do we start out in DISABLED mode? */
- if (ctdb->start_as_disabled != 0) {
- DEBUG(DEBUG_INFO, ("This node is configured to start in DISABLED state\n"));
- ctdb->nodes[i]->flags |= NODE_FLAGS_DISABLED;
- }
- /* do we start out in STOPPED mode? */
- if (ctdb->start_as_stopped != 0) {
- DEBUG(DEBUG_INFO, ("This node is configured to start in STOPPED state\n"));
- ctdb->nodes[i]->flags |= NODE_FLAGS_STOPPED;
- }
if (listen(ctcp->listen_fd, 10) == -1) {
goto failed;