]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
submission: Move client_connection_disconnect|free()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 2 Mar 2021 13:41:15 +0000 (15:41 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Thu, 11 Mar 2021 11:19:09 +0000 (11:19 +0000)
src/submission/submission-client.c

index bda83b3b25691b5556d766e07eefb0009a47c821..b071b18e9d6c99784b50f9351c20ba3b38810836 100644 (file)
@@ -393,26 +393,6 @@ client_connection_state_changed(void *context ATTR_UNUSED,
                submission_refresh_proctitle();
 }
 
-static void client_connection_disconnect(void *context, const char *reason)
-{
-       struct client *client = context;
-       struct smtp_server_connection *conn = client->conn;
-       const struct smtp_server_stats *stats;
-
-       if (conn != NULL) {
-               stats = smtp_server_connection_get_stats(conn);
-               client->stats = *stats;
-       }
-       client_disconnect(client, NULL, reason);
-}
-
-static void client_connection_free(void *context)
-{
-       struct client *client = context;
-
-       client_destroy(client, NULL, NULL);
-}
-
 static const char *client_stats(struct client *client)
 {
        const char *trans_id = (client->conn == NULL ? "" :
@@ -480,6 +460,26 @@ void client_disconnect(struct client *client, const char *enh_code,
        }
 }
 
+static void client_connection_disconnect(void *context, const char *reason)
+{
+       struct client *client = context;
+       struct smtp_server_connection *conn = client->conn;
+       const struct smtp_server_stats *stats;
+
+       if (conn != NULL) {
+               stats = smtp_server_connection_get_stats(conn);
+               client->stats = *stats;
+       }
+       client_disconnect(client, NULL, reason);
+}
+
+static void client_connection_free(void *context)
+{
+       struct client *client = context;
+
+       client_destroy(client, NULL, NULL);
+}
+
 uoff_t client_get_max_mail_size(struct client *client)
 {
        struct submission_backend *backend;