From: Martin Schwenke Date: Thu, 17 Mar 2016 00:32:49 +0000 (+1100) Subject: ctdb-killtcp: Simplify includes by using ctdb_sock_addr_to_string() X-Git-Tag: tdb-1.3.9~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c56112949a38ac5238c847073630807747da8f0e;p=thirdparty%2Fsamba.git ctdb-killtcp: Simplify includes by using ctdb_sock_addr_to_string() This allows common.h and ctdb_private.h to be dropped. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/server/killtcp.c b/ctdb/server/killtcp.c index be86d9209b8..ff32fdc1fc5 100644 --- a/ctdb/server/killtcp.c +++ b/ctdb/server/killtcp.c @@ -24,11 +24,11 @@ #include "lib/util/debug.h" -#include "ctdb_private.h" +#include "protocol/protocol.h" +#include "protocol/protocol_api.h" #include "common/rb_tree.h" #include "common/system.h" -#include "common/common.h" #include "common/logging.h" #include "killtcp.h" @@ -127,10 +127,11 @@ static void capture_tcp_handler(struct tevent_context *ev, /* This one has been tickled ! now reset him and remove him from the list. */ - DEBUG(DEBUG_INFO, ("sending a tcp reset to kill connection :%d -> %s:%d\n", - ntohs(con->dst_addr.ip.sin_port), - ctdb_addr_to_str(&con->src_addr), - ntohs(con->src_addr.ip.sin_port))); + DEBUG(DEBUG_INFO, + ("sending a tcp reset to kill connection :%d -> %s:%d\n", + ntohs(con->dst_addr.ip.sin_port), + ctdb_sock_addr_to_string(con, &con->src_addr), + ntohs(con->src_addr.ip.sin_port))); ctdb_sys_send_tcp(&con->dst_addr, &con->src_addr, ack_seq, seq, 1); talloc_free(con);