]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: test-smtp-server-errors: Add support for client-side connection context...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 8 Apr 2018 13:16:05 +0000 (15:16 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 12 Apr 2018 10:35:30 +0000 (10:35 +0000)
src/lib-smtp/test-smtp-server-errors.c

index 154c0d578f3ef104c95c5f0d8c0d94df3e819cab..1077ac4188dd2b1ff4dd31861c3eeac7cf8b6207 100644 (file)
@@ -30,6 +30,7 @@ struct server_connection {
 
 struct client_connection {
        struct connection conn;
+       void *context;
 
        pool_t pool;
 };
@@ -61,6 +62,7 @@ static unsigned int client_pids_count = 0;
 static unsigned int client_index;
 static void (*test_client_connected)(struct client_connection *conn);
 static void (*test_client_input)(struct client_connection *conn);
+static void (*test_client_deinit)(struct client_connection *conn);
 
 /*
  * Forward declarations
@@ -1332,6 +1334,8 @@ server_connection_deinit(struct client_connection **_conn)
 
        *_conn = NULL;
 
+       if (test_client_deinit != NULL)
+               test_client_deinit(conn);
        connection_deinit(&conn->conn);
        pool_unref(&conn->pool);
 }