From: Stephan Bosch Date: Sun, 2 Sep 2018 13:44:33 +0000 (+0200) Subject: submission: Split off corking and uncorking the relay connection in a separate function. X-Git-Tag: 2.3.9~1323 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74786deea14fbb830ff21823a932ce9576c7f6e0;p=thirdparty%2Fdovecot%2Fcore.git submission: Split off corking and uncorking the relay connection in a separate function. --- diff --git a/src/submission/submission-client.c b/src/submission/submission-client.c index 4cd04612e2..4ced04a465 100644 --- a/src/submission/submission-client.c +++ b/src/submission/submission-client.c @@ -47,19 +47,28 @@ unsigned int submission_client_count; static const struct smtp_server_callbacks smtp_callbacks; /* try to proxy pipelined commands in a similarly pipelined fashion */ +static void client_proxy_input_pre(struct client *client) +{ + if (client->proxy_conn != NULL) + smtp_client_connection_cork(client->proxy_conn); +} +static void client_proxy_input_post(struct client *client) +{ + if (client->proxy_conn != NULL) + smtp_client_connection_uncork(client->proxy_conn); +} + static void client_input_pre(void *context) { struct client *client = context; - if (client->proxy_conn != NULL) - smtp_client_connection_cork(client->proxy_conn); + client_proxy_input_pre(client); } static void client_input_post(void *context) { struct client *client = context; - if (client->proxy_conn != NULL) - smtp_client_connection_uncork(client->proxy_conn); + client_proxy_input_post(client); } static const char *client_remote_id(struct client *client)