]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: connection - Move creation of passthrough event in connection_client_connected().
authorStephan Bosch <stephan.bosch@dovecot.fi>
Wed, 27 Feb 2019 20:30:54 +0000 (21:30 +0100)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Fri, 1 Mar 2019 23:56:57 +0000 (00:56 +0100)
Moved close to where it is used, which is more common in event code elsewhere.

src/lib/connection.c

index 5a4af923b2558ac56a70a960dff1679516dff373..b6e152198f864fea3692a9c1108bc57bed6a5aff 100644 (file)
@@ -433,9 +433,6 @@ void connection_streams_changed(struct connection *conn)
 
 static void connection_client_connected(struct connection *conn, bool success)
 {
-       struct event_passthrough *e = event_create_passthrough(conn->event)->
-               set_name("server_connection_connected");
-
        i_assert(conn->list->set.client);
 
        connection_update_properties(conn);
@@ -444,6 +441,8 @@ static void connection_client_connected(struct connection *conn, bool success)
        event_add_timeval(conn->event, "connect_finished_time",
                          &ioloop_timeval);
 
+       struct event_passthrough *e = event_create_passthrough(conn->event)->
+               set_name("server_connection_connected");
        if (success) {
                e_debug(e->event(), "Client connected (fd=%d)",
                        conn->fd_in);