From f7aac2f7553bcdb609719529988aa8b33555dda9 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Sun, 18 Aug 2024 20:49:30 +1000 Subject: [PATCH] ctdb-tcp: Use already constructed node name Node has been found, so use the pre-constructed name instead of calling ctdb_addr_to_str(). This will also print the port, which might be useful if we ever add the ability to also specify ports in the nodes list. Signed-off-by: Martin Schwenke Reviewed-by: Volker Lendecke --- ctdb/tcp/tcp_connect.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c index 8fb041e08e6..69934a7c10f 100644 --- a/ctdb/tcp/tcp_connect.c +++ b/ctdb/tcp/tcp_connect.c @@ -330,14 +330,14 @@ static void ctdb_listen_event(struct tevent_context *ev, struct tevent_fd *fde, if (tnode == NULL) { /* This can't happen - see ctdb_tcp_initialise() */ DBG_ERR("INTERNAL ERROR setting up connection from node %s\n", - ctdb_addr_to_str(&addr)); + node->name); close(fd); return; } if (tnode->in_queue != NULL) { DBG_ERR("Incoming queue active, rejecting connection from %s\n", - ctdb_addr_to_str(&addr)); + node->name); close(fd); return; } @@ -371,7 +371,7 @@ static void ctdb_listen_event(struct tevent_context *ev, struct tevent_fd *fde, ctdb_tcp_read_cb, node, "ctdbd-%s", - ctdb_addr_to_str(&addr)); + node->name); if (tnode->in_queue == NULL) { DBG_ERR("Failed to set up incoming queue\n"); close(fd); -- 2.47.3