This one is in a rarely used error path, so call a function that
talloc()s the string instead.
Again, 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 <mschwenke@ddn.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Aug 20 14:24:14 UTC 2024 on atb-devel-224
#include "common/logging.h"
#include "common/path.h"
+#include "protocol/protocol_util.h"
+
#include "ctdb_tcp.h"
/*
node = ctdb_ip_to_node(ctdb, &addr);
if (node == NULL) {
- D_ERR("Refused connection from unknown node %s\n",
- ctdb_addr_to_str(&addr));
+ char *t = ctdb_sock_addr_to_string(ctcp, &addr, true);
+ if (t == NULL) {
+ DBG_ERR("Refused connection from unparsable node\n");
+ goto failed;
+ }
+
+ D_ERR("Refused connection from unknown node %s\n", t);
+ talloc_free(t);
goto failed;
}
source=bld.SUBDIR('tcp',
'tcp_connect.c tcp_init.c tcp_io.c'),
includes='include',
- deps='replace tdb talloc tevent')
+ deps='replace tdb talloc tevent ctdb-protocol-util')
ib_deps = ''
if bld.env.HAVE_INFINIBAND: