From: Stephan Bosch Date: Sun, 8 Apr 2018 13:16:05 +0000 (+0200) Subject: lib-smtp: test-smtp-server-errors: Add support for client-side connection context... X-Git-Tag: 2.3.2.rc1~149 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=adfadd2077a24716357d39ce17d83c87fd904399;p=thirdparty%2Fdovecot%2Fcore.git lib-smtp: test-smtp-server-errors: Add support for client-side connection context data. --- diff --git a/src/lib-smtp/test-smtp-server-errors.c b/src/lib-smtp/test-smtp-server-errors.c index d2569e7657..1407242bca 100644 --- a/src/lib-smtp/test-smtp-server-errors.c +++ b/src/lib-smtp/test-smtp-server-errors.c @@ -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); }