]> 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)
committerGitLab <gitlab@git.dovecot.net>
Wed, 2 Nov 2016 11:42:18 +0000 (13:42 +0200)
src/lib-http/http-client-peer.c

index 0bcaa4591d45a0109f402cc82ce3fca5be05e19e..44b44716f9c952b86765c004afc9b99344c9182b 100644 (file)
@@ -630,8 +630,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,
@@ -643,6 +648,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 */