]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-auth-client: auth-master - Add debug messages
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 11 Mar 2018 21:23:57 +0000 (22:23 +0100)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Wed, 27 Aug 2025 14:17:02 +0000 (16:17 +0200)
src/lib-auth-client/auth-master-request.c
src/lib-auth-client/auth-master.c

index 8c7a1636ff5db883a60c1f707f05d4905039a7c1..4941f7418335f0736b2faec7b8702ee4056a64e0 100644 (file)
@@ -39,6 +39,8 @@ static void auth_master_request_remove(struct auth_master_request *req)
                return;
        req->removed = TRUE;
 
+       e_debug(req->event, "Remove");
+
        if (req->sent)
                hash_table_remove(conn->requests, POINTER_CAST(req->id));
        DLLIST2_REMOVE(&conn->requests_head, &conn->requests_tail, req);
@@ -72,6 +74,8 @@ static bool auth_master_request_unref(struct auth_master_request **_req)
        if (--req->refcount > 0)
                return TRUE;
 
+       e_debug(req->event, "Destroy");
+
        auth_master_request_remove(req);
 
        if (array_is_created(&req->destroy_callbacks)) {
@@ -274,6 +278,8 @@ auth_master_request(struct auth_master_connection *conn, const char *cmd,
                req->args = p_memdup(req->pool, args, args_size);
        req->args_size = args_size;
 
+       e_debug(req->event, "Created");
+
        return req;
 }
 
@@ -326,6 +332,8 @@ int auth_master_request_submit(struct auth_master_request **_req)
        auth_master_connection_start_timeout(conn);
        auth_master_stop_idle(conn);
 
+       e_debug(req->event, "Submitted");
+
        return 0;
 }
 
@@ -352,6 +360,8 @@ bool auth_master_request_wait(struct auth_master_request *req)
 
        i_assert(auth_master_request_count(conn) > 0);
 
+       e_debug(req->event, "Waiting for request to complete");
+
        if ((conn->flags & AUTH_MASTER_FLAG_NO_INNER_IOLOOP) != 0)
                ioloop = conn->ioloop;
        else {
@@ -386,6 +396,8 @@ bool auth_master_request_wait(struct auth_master_request *req)
                io_loop_run(conn->ioloop);
        conn->waiting = waiting;
 
+       e_debug(req->event, "Finished waiting for request");
+
        timeout_remove(&to);
 
        if (conn->conn.output != NULL && was_corked)
index 4612416889ed890ce8e6984517ae5bf980ba0cea..8883a062cb058968e3ddc5257b0f2527809e1529 100644 (file)
@@ -470,6 +470,7 @@ void auth_master_switch_ioloop(struct auth_master_connection *conn)
 
 static void auth_master_idle_timeout(struct auth_master_connection *conn)
 {
+       e_debug(conn->conn.event, "Idle timeout");
        auth_master_disconnect(conn);
 }
 
@@ -511,6 +512,8 @@ void auth_master_wait(struct auth_master_connection *conn)
 
        auth_master_ref(conn);
 
+       e_debug(conn->conn.event, "Waiting for all requests to complete");
+
        if ((conn->flags & AUTH_MASTER_FLAG_NO_INNER_IOLOOP) != 0)
                ioloop = conn->ioloop;
        else {
@@ -555,6 +558,8 @@ void auth_master_wait(struct auth_master_connection *conn)
                        conn->prev_ioloop = NULL;
        }
 
+       e_debug(conn->conn.event, "Finished waiting for requests");
+
        auth_master_unref(&conn);
 }