Modernise debug while touching the code.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15523
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Dec 15 12:09:21 UTC 2023 on atb-devel-224
(cherry picked from commit
4b7329f15820f1b4d9a7b7f0947719c4217b312a)
Autobuild-User(v4-18-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-18-test): Sat Dec 16 15:26:50 UTC 2023 on atb-devel-224
int ret;
TDB_DATA data;
struct ctdb_vnn *vnn;
int ret;
TDB_DATA data;
struct ctdb_vnn *vnn;
- ctdb_sock_addr dst_addr;
char conn_str[132] = { 0, };
/* If we don't have public IPs, tickles are useless */
char conn_str[132] = { 0, };
/* If we don't have public IPs, tickles are useless */
ctdb_canonicalize_ip_inplace(&tcp_sock->src);
ctdb_canonicalize_ip_inplace(&tcp_sock->dst);
ctdb_canonicalize_ip_inplace(&tcp_sock->src);
ctdb_canonicalize_ip_inplace(&tcp_sock->dst);
- dst_addr = tcp_sock->dst;
ret = ctdb_connection_to_buf(conn_str,
sizeof(conn_str),
ret = ctdb_connection_to_buf(conn_str,
sizeof(conn_str),
strlcpy(conn_str, "UNKNOWN", sizeof(conn_str));
}
strlcpy(conn_str, "UNKNOWN", sizeof(conn_str));
}
- vnn = find_public_ip_vnn(ctdb, &dst_addr);
+ vnn = find_public_ip_vnn(ctdb, &tcp_sock->dst);
if (vnn == NULL) {
D_ERR("Could not register TCP connection %s - "
"not a public address (client_id %u pid %u)\n",
if (vnn == NULL) {
D_ERR("Could not register TCP connection %s - "
"not a public address (client_id %u pid %u)\n",
}
if (vnn->pnn != ctdb->pnn) {
}
if (vnn->pnn != ctdb->pnn) {
- DEBUG(DEBUG_ERR,("Attempt to register tcp client for IP %s we don't hold - failing (client_id %u pid %u)\n",
- ctdb_addr_to_str(&dst_addr),
- client_id, client->pid));
+ D_ERR("Attempt to register tcp client for IP %s we don't hold - "
+ "failing (client_id %u pid %u)\n",
+ ctdb_addr_to_str(&tcp_sock->dst),
+ client_id, client->pid);
/* failing this call will tell smbd to die */
return -1;
}
/* failing this call will tell smbd to die */
return -1;
}