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.9~2028 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a690a5a435ab25d9afd8f4d33563501f31fac528;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 154c0d578f..1077ac4188 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); }