struct timeval t, void *private_data);
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_connection(struct ctdb_node *node);
+void ctdb_tcp_stop_outgoing(struct ctdb_node *node);
#define CTDB_TCP_ALIGNMENT 8
#include "ctdb_tcp.h"
/*
- stop any connecting (established or pending) to a node
+ stop any outgoing connection (established or pending) to a node
*/
-void ctdb_tcp_stop_connection(struct ctdb_node *node)
+void ctdb_tcp_stop_outgoing(struct ctdb_node *node)
{
struct ctdb_tcp_node *tnode = talloc_get_type(
node->transport_data, struct ctdb_tcp_node);
ret = getsockopt(tnode->out_fd, SOL_SOCKET, SO_ERROR, &error, &len);
if (ret != 0 || error != 0) {
- ctdb_tcp_stop_connection(node);
+ ctdb_tcp_stop_outgoing(node);
tnode->connect_te = tevent_add_timer(ctdb->ev, tnode,
timeval_current_ofs(1, 0),
ctdb_tcp_node_connect, node);
node->name);
if (tnode->out_queue == NULL) {
DBG_ERR("Failed to set up outgoing queue\n");
- ctdb_tcp_stop_connection(node);
+ ctdb_tcp_stop_outgoing(node);
tnode->connect_te = tevent_add_timer(ctdb->ev,
tnode,
timeval_current_ofs(1, 0),
ctdb_sock_addr sock_out;
int ret;
- ctdb_tcp_stop_connection(node);
+ ctdb_tcp_stop_outgoing(node);
sock_out = node->address;
return;
failed:
- ctdb_tcp_stop_connection(node);
+ ctdb_tcp_stop_outgoing(node);
tnode->connect_te = tevent_add_timer(ctdb->ev,
tnode,
timeval_current_ofs(1, 0),
DEBUG(DEBUG_NOTICE,("Tearing down connection to dead node :%d\n", node->pnn));
TALLOC_FREE(tnode->in_queue);
- ctdb_tcp_stop_connection(node);
+ ctdb_tcp_stop_outgoing(node);
tnode->connect_te = tevent_add_timer(node->ctdb->ev, tnode,
timeval_zero(),