]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp-client-connection - Use the default connection label.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Thu, 28 Feb 2019 08:29:44 +0000 (09:29 +0100)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Fri, 1 Mar 2019 23:56:58 +0000 (00:56 +0100)
src/lib-smtp/smtp-client-connection.c

index 2812c93793865128b6d1a58e62685baabafc5e45..e7212c9293c7236e75b02fa8e9c919e8096bd251 100644 (file)
@@ -1662,7 +1662,8 @@ static const struct connection_settings smtp_client_connection_set = {
        .input_max_size = (size_t)-1,
        .output_max_size = (size_t)-1,
        .client = TRUE,
-       .delayed_unix_client_connected_callback = TRUE
+       .delayed_unix_client_connected_callback = TRUE,
+       .log_connection_id = TRUE,
 };
 
 static const struct connection_vfuncs smtp_client_connection_vfuncs = {
@@ -1827,17 +1828,18 @@ smtp_client_connection_do_create(struct smtp_client *client, const char *name,
        else
                conn->event = event_create(client->event);
        event_set_forced_debug(conn->event, (set != NULL && set->debug));
-
-       event_set_append_log_prefix(conn->event,
-               t_strdup_printf("%s-client: conn %s [%u]: ",
-                               smtp_protocol_name(conn->protocol),
-                               name, conn->id));
        event_add_str(conn->event, "protocol",
                      smtp_protocol_name(conn->protocol));
 
        conn->conn.event_parent = conn->event;
        connection_init(conn->client->conn_list, &conn->conn, name);
 
+       event_set_append_log_prefix(
+               conn->event,
+               t_strdup_printf("%s-client: conn %s: ",
+                               smtp_protocol_name(conn->protocol),
+                               conn->conn.label));
+
        return conn;
 }