No change in behaviour. This makes the code self-documenting.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14295
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit
2c73dbafba50b28e72a8ec7b4382fae42fca6d17)
void ctdb_tcp_read_cb(uint8_t *data, size_t cnt, void *args);
void ctdb_tcp_tnode_cb(uint8_t *data, size_t cnt, void *private_data);
void ctdb_tcp_stop_outgoing(struct ctdb_node *node);
+void ctdb_tcp_stop_incoming(struct ctdb_node *node);
#define CTDB_TCP_ALIGNMENT 8
}
}
+/*
+ stop incoming connection to a node
+ */
+void ctdb_tcp_stop_incoming(struct ctdb_node *node)
+{
+ struct ctdb_tcp_node *tnode = talloc_get_type(
+ node->transport_data, struct ctdb_tcp_node);
+
+ TALLOC_FREE(tnode->in_queue);
+}
/*
called when a complete packet has come in - should not happen on this socket
node->transport_data, struct ctdb_tcp_node);
DEBUG(DEBUG_NOTICE,("Tearing down connection to dead node :%d\n", node->pnn));
- TALLOC_FREE(tnode->in_queue);
+ ctdb_tcp_stop_incoming(node);
ctdb_tcp_stop_outgoing(node);
tnode->connect_te = tevent_add_timer(node->ctdb->ev, tnode,