]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Add event with category "auth" to struct auth_client_connection.
authorSergey Kitov <sergey.kitov@open-xchange.com>
Mon, 19 Mar 2018 10:16:23 +0000 (12:16 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 30 May 2018 07:35:53 +0000 (07:35 +0000)
src/auth/auth-client-connection.c
src/auth/auth-client-connection.h

index 0bcc8bc2ebaeb2e9269b496c9d2f6a56d5fe20c1..e037b8e22430db679dc509080b9744649f75a3aa 100644 (file)
@@ -338,6 +338,10 @@ void auth_client_connection_create(struct auth *auth, int fd,
        conn->connect_uid = ++connect_uid_counter;
        conn->login_requests = login_requests;
        conn->token_auth = token_auth;
+       conn->event = event_create(NULL);
+       if (auth->set->debug)
+               event_set_forced_debug(conn->event, TRUE);
+       event_add_category(conn->event, &event_category_auth);
        random_fill(conn->cookie, sizeof(conn->cookie));
 
        conn->fd = fd;
@@ -428,6 +432,7 @@ static void auth_client_connection_unref(struct auth_client_connection **_conn)
        if (--conn->refcount > 0)
                return;
 
+       event_unref(&conn->event);
        i_stream_unref(&conn->input);
        o_stream_unref(&conn->output);
        i_free(conn);
index 91a693f3b68bd9be2f06b02c0d16aa4306812256..7b10f765da060733d6cca889582121bfd51b19cb 100644 (file)
@@ -6,6 +6,7 @@
 struct auth_client_connection {
        struct auth_client_connection *prev, *next;
        struct auth *auth;
+       struct event *event;
        int refcount;
 
        int fd;