#include "includes.h"
#include "lib/tdb/include/tdb.h"
-#include "lib/events/events.h"
+#include "lib/tevent/tevent.h"
#include "system/network.h"
#include "system/filesys.h"
#include "../include/ctdb_private.h"
static int tnode_destructor(struct ctdb_tcp_node *tnode)
{
- struct ctdb_node *node = talloc_find_parent_bytype(tnode, struct ctdb_node);
+ // struct ctdb_node *node = talloc_find_parent_bytype(tnode, struct ctdb_node);
if (tnode->fd != -1) {
close(tnode->fd);
talloc_set_destructor(tnode, tnode_destructor);
tnode->out_queue = ctdb_queue_setup(node->ctdb, node, tnode->fd, CTDB_TCP_ALIGNMENT,
- ctdb_tcp_tnode_cb, node);
+ ctdb_tcp_tnode_cb, node, "to-node-%s", node->name);
return 0;
}
exit(1);
}
- for (i=0; i<ctdb->num_nodes; i++) {
+ for (i=0; i < ctdb->num_nodes; i++) {
+ if (ctdb->nodes[i]->flags & NODE_FLAGS_DELETED) {
+ continue;
+ }
if (ctdb_tcp_add_node(ctdb->nodes[i]) != 0) {
DEBUG(DEBUG_CRIT, ("methods->add_node failed at %d\n", i));
return -1;
{
int i;
- for (i=0; i<ctdb->num_nodes; i++) {
+ for (i=0; i < ctdb->num_nodes; i++) {
+ if (ctdb->nodes[i]->flags & NODE_FLAGS_DELETED) {
+ continue;
+ }
ctdb_tcp_connect_node(ctdb->nodes[i]);
}