]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: connection API - Add client_connect_succeeded field
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 1 Dec 2025 23:55:23 +0000 (01:55 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Thu, 20 Nov 2025 22:24:01 +0000 (22:24 +0000)
This is needed after the following change, since it's not possible to use
input/output != NULL check for it.

src/lib/connection.c
src/lib/connection.h

index 8ac3c0248508d2463bef9814ccaccd7798ac3a0e..a7fc68e172e2e182b5d89a068109ddfe1000e11c 100644 (file)
@@ -566,6 +566,7 @@ static void connection_client_connected(struct connection *conn, bool success)
        connection_update_properties(conn);
 
        conn->connect_finished = ioloop_timeval;
+       conn->client_connect_succeeded = success;
 
        struct event_passthrough *e = event_create_passthrough(conn->event)->
                set_name("server_connection_connected");
@@ -598,6 +599,7 @@ connection_init_full(struct connection_list *list, struct connection *conn,
 
        i_zero(&conn->connect_started);
        i_zero(&conn->connect_finished);
+       conn->client_connect_succeeded = FALSE;
 
        conn->ioloop = current_ioloop;
        conn->fd_in = fd_in;
index 23cd83f6f0f95077cced7f4a19be166723595836..4830f0ff5766195a390c4f0e1ee434aeec73d4cb 100644 (file)
@@ -188,6 +188,8 @@ struct connection {
        /* Reason for disconnection */
        enum connection_disconnect_reason disconnect_reason;
 
+       /* Client connect() succeeded. */
+       bool client_connect_succeeded:1;
        /* We have received a version from remote end. */
        bool version_received:1;
        /* Set if this is a unix socket. */