diff options
author | Martin Schwenke <martin@meltin.net> | 2017-07-04 12:11:20 +1000 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2017-09-19 13:30:27 +0200 |
commit | c715da3bdbf89ac77338876b47535b918d711f38 (patch) | |
tree | 0e6ebc0d6e26de97f6912eb7fb54f3cc3fed414f /ctdb/tools | |
parent | 8fb6c1adb03e33159059cb1343a27c588c4cb6d5 (diff) | |
download | samba-c715da3bdbf89ac77338876b47535b918d711f38.tar.gz |
ctdb-tools: Add debug to ctdb_killtcp
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/tools')
-rw-r--r-- | ctdb/tools/ctdb_killtcp.c | 8 |
1 files changed, 8 insertions, 0 deletions
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"); |