From: Martin Schwenke Date: Tue, 4 Jul 2017 02:11:20 +0000 (+1000) Subject: ctdb-tools: Add debug to ctdb_killtcp X-Git-Tag: ldb-1.3.0~135 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=c715da3bdbf89ac77338876b47535b918d711f38 ctdb-tools: Add debug to ctdb_killtcp Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tools/ctdb_killtcp.c b/ctdb/tools/ctdb_killtcp.c index a004f724451..07d45f1f4ef 100644 --- a/ctdb/tools/ctdb_killtcp.c +++ b/ctdb/tools/ctdb_killtcp.c @@ -91,9 +91,13 @@ static struct tevent_req *reset_connections_send( return tevent_req_post(req, ev); } + DBG_DEBUG("Adding %u connections to hash\n", conn_list->num); for (i = 0; i < conn_list->num; i++) { struct ctdb_connection *c = &conn_list->conn[i]; + DBG_DEBUG("Adding connection to hash: %s\n", + ctdb_connection_to_string(conn_list, c, true)); + /* Connection is stored as a key in the connections hash */ ret = db_hash_add(state->connections, (uint8_t *)discard_const(c), sizeof(*c), @@ -183,6 +187,8 @@ static void reset_connections_capture_tcp_handler(struct tevent_context *ev, (uint8_t*)&conn, sizeof(conn)); if (ret == ENOENT) { /* Packet for some other connection, ignore */ + DBG_DEBUG("Ignoring packet for unknown connection: %s\n", + ctdb_connection_to_string(state, &conn, true)); return; } if (ret != 0) { @@ -283,6 +289,8 @@ static int reset_connections_tickle_connection( return 1; } + DBG_DEBUG("Sending tickle ACK for connection '%s'\n", + ctdb_connection_to_string(state, conn, true)); ret = ctdb_sys_send_tcp(&conn->server, &conn->client, 0, 0, 0); if (ret != 0) { DBG_ERR("Error sending tickle ACK\n");