1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

use ctdb_dead_node() instead of reimplementing the same code again

this leaves only one single function where a node is marked as dead
instead of two places

(This used to be ctdb commit aa764ea26cc26d5c1ae188105236da603576f45b)
This commit is contained in:
Ronnie Sahlberg 2007-05-19 16:59:10 +10:00
parent ab66fb840e
commit 02a9f1b0a0
3 changed files with 3 additions and 3 deletions

View File

@ -380,7 +380,7 @@ static void ctdb_recv_pkt(struct ctdb_context *ctdb, uint8_t *data, uint32_t len
/*
called by the transport layer when a node is dead
*/
static void ctdb_node_dead(struct ctdb_node *node)
void ctdb_node_dead(struct ctdb_node *node)
{
node->ctdb->num_connected--;
node->flags &= ~NODE_FLAGS_CONNECTED;

View File

@ -57,8 +57,7 @@ static void ctdb_check_for_dead_nodes(struct event_context *ev, struct timed_eve
if (node->dead_count >= CTDB_MONITORING_DEAD_COUNT) {
DEBUG(0,("Node %u is dead - marking as not connected\n", node->vnn));
node->flags &= ~NODE_FLAGS_CONNECTED;
ctdb_daemon_cancel_controls(ctdb, node);
ctdb_node_dead(node);
/* maybe tell the transport layer to kill the
sockets as well?
*/

View File

@ -826,5 +826,6 @@ void ctdb_send_keepalive(struct ctdb_context *ctdb, uint32_t destnode);
void ctdb_daemon_cancel_controls(struct ctdb_context *ctdb, struct ctdb_node *node);
void ctdb_call_resend_all(struct ctdb_context *ctdb);
void ctdb_node_dead(struct ctdb_node *node);
#endif