From: Stephan Bosch Date: Tue, 13 Sep 2016 23:37:05 +0000 (+0200) Subject: lib-http: client: Added debug messages that indicate when a queue is linked/unlinked... X-Git-Tag: 2.2.27~236 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e008bd3700dc8ce82ddc56b1762ef22c77532b98;p=thirdparty%2Fdovecot%2Fcore.git lib-http: client: Added debug messages that indicate when a queue is linked/unlinked to a peer. --- diff --git a/src/lib-http/http-client-peer.c b/src/lib-http/http-client-peer.c index 6eebe3cf4b..ce025a610b 100644 --- a/src/lib-http/http-client-peer.c +++ b/src/lib-http/http-client-peer.c @@ -612,8 +612,13 @@ bool http_client_peer_have_queue(struct http_client_peer *peer, void http_client_peer_link_queue(struct http_client_peer *peer, struct http_client_queue *queue) { - if (!http_client_peer_have_queue(peer, queue)) + if (!http_client_peer_have_queue(peer, queue)) { array_append(&peer->queues, &queue, 1); + + http_client_peer_debug(peer, + "Linked queue %s (%d queues linked)", + queue->name, array_count(&peer->queues)); + } } void http_client_peer_unlink_queue(struct http_client_peer *peer, @@ -625,6 +630,11 @@ void http_client_peer_unlink_queue(struct http_client_peer *peer, if (*queue_idx == queue) { array_delete(&peer->queues, array_foreach_idx(&peer->queues, queue_idx), 1); + + http_client_peer_debug(peer, + "Unlinked queue %s (%d queues linked)", + queue->name, array_count(&peer->queues)); + if (array_count(&peer->queues) == 0) { if (http_client_peer_start_backoff_timer(peer)) { /* will disconnect any pending connections */