]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: client: Added debug messages that indicate when a queue is linked/unlinked...
authorStephan Bosch <stephan@dovecot.fi>
Tue, 13 Sep 2016 23:37:05 +0000 (01:37 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 9 Nov 2016 12:17:22 +0000 (14:17 +0200)
src/lib-http/http-client-peer.c

index 6eebe3cf4b0ea8c4c99328e0307ed79f6ff130a0..ce025a610bfd3ddafbea9829360e3fbc97cb58cc 100644 (file)
@@ -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 */