mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
ctdb-daemon: Add a helper variable
Simplifies a subsequent change. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14784 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
6845dca87e
commit
e0a7b5a9e8
@ -1237,26 +1237,28 @@ failed:
|
|||||||
|
|
||||||
static void initialise_node_flags (struct ctdb_context *ctdb)
|
static void initialise_node_flags (struct ctdb_context *ctdb)
|
||||||
{
|
{
|
||||||
|
struct ctdb_node *node = NULL;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
/* Always found: PNN correctly set just before this is called */
|
/* Always found: PNN correctly set just before this is called */
|
||||||
for (i = 0; i < ctdb->num_nodes; i++) {
|
for (i = 0; i < ctdb->num_nodes; i++) {
|
||||||
if (ctdb->pnn == ctdb->nodes[i]->pnn) {
|
node = ctdb->nodes[i];
|
||||||
|
if (ctdb->pnn == node->pnn) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ctdb->nodes[i]->flags &= ~NODE_FLAGS_DISCONNECTED;
|
node->flags &= ~NODE_FLAGS_DISCONNECTED;
|
||||||
|
|
||||||
/* do we start out in DISABLED mode? */
|
/* do we start out in DISABLED mode? */
|
||||||
if (ctdb->start_as_disabled != 0) {
|
if (ctdb->start_as_disabled != 0) {
|
||||||
D_ERR("This node is configured to start in DISABLED state\n");
|
D_ERR("This node is configured to start in DISABLED state\n");
|
||||||
ctdb->nodes[i]->flags |= NODE_FLAGS_DISABLED;
|
node->flags |= NODE_FLAGS_DISABLED;
|
||||||
}
|
}
|
||||||
/* do we start out in STOPPED mode? */
|
/* do we start out in STOPPED mode? */
|
||||||
if (ctdb->start_as_stopped != 0) {
|
if (ctdb->start_as_stopped != 0) {
|
||||||
D_ERR("This node is configured to start in STOPPED state\n");
|
D_ERR("This node is configured to start in STOPPED state\n");
|
||||||
ctdb->nodes[i]->flags |= NODE_FLAGS_STOPPED;
|
node->flags |= NODE_FLAGS_STOPPED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user