From 936ddb0d150ba3705e7190be274761331ef4fdca Mon Sep 17 00:00:00 2001 From: Garick Hamlin Date: Mon, 5 Nov 2012 15:14:40 -0500 Subject: [PATCH] Compute correct send_queue_len. Previously this was incremented, but not decremented. I've corrected the code to decrement it. It doesn't appear to be used anywhere, but it is helpful to implement xmpp_graceful_stop(). --- src/event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/event.c b/src/event.c index dd9fe19..f1340ea 100644 --- a/src/event.c +++ b/src/event.c @@ -147,6 +147,7 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout) xmpp_free(ctx, sq->data); tsq = sq; sq = sq->next; + conn->send_queue_len--; xmpp_free(ctx, tsq); /* pop the top item */