From a690a5a435ab25d9afd8f4d33563501f31fac528 Mon Sep 17 00:00:00 2001 From: Stephan Bosch Date: Sun, 8 Apr 2018 15:16:05 +0200 Subject: [PATCH] lib-smtp: test-smtp-server-errors: Add support for client-side connection context data. --- src/lib-smtp/test-smtp-server-errors.c | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- 2.47.3