move "SENT: ..." debug statement to the place where it belongs

This also adds a "QUEUED: ..." debug statement at verbosity level 2.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2021-07-22 23:06:01 +02:00
parent e73cdb57f3
commit e26548375e
2 changed files with 2 additions and 1 deletions

View File

@@ -1477,7 +1477,7 @@ static int _send_raw(xmpp_conn_t *conn, char *data, size_t len)
conn->send_queue_tail = item;
}
conn->send_queue_len++;
xmpp_debug(conn->ctx, "conn", "SENT: %s", data);
xmpp_debug_verbose(2, conn->ctx, "conn", "QUEUED: %s", data);
xmpp_debug_verbose(1, conn->ctx, "conn", "Added queue element: %p", item);
return XMPP_EOK;
}

View File

@@ -134,6 +134,7 @@ void xmpp_run_once(xmpp_ctx_t *ctx, unsigned long timeout)
break; /* partial write or an error */
/* all data for this queue item written, delete and move on */
xmpp_debug(conn->ctx, "conn", "SENT: %s", sq->data);
xmpp_debug_verbose(1, ctx, "xmpp",
"Finished writing queue element: %p.", sq);
xmpp_free(ctx, sq->data);