]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
submission: relay backend: Turn client_proxy_input_pre/post() into relay backend...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sat, 15 Sep 2018 12:44:41 +0000 (14:44 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 12 Feb 2019 13:40:41 +0000 (15:40 +0200)
src/submission/submission-backend-relay.c
src/submission/submission-backend-relay.h
src/submission/submission-client.c

index 32cd8f545ecdd8551d1e9ee0655a850734794eaf..39aac812f95826b016338b3d07c270989fed4b9d 100644 (file)
@@ -846,16 +846,20 @@ static void backend_relay_start(struct submission_backend *_backend)
 }
 
 /* try to proxy pipelined commands in a similarly pipelined fashion */
-void client_proxy_input_pre(struct client *client)
+static void
+backend_relay_client_input_pre(struct submission_backend *_backend)
 {
-       struct submission_backend_relay *backend = &client->backend;
+       struct submission_backend_relay *backend =
+               (struct submission_backend_relay *)_backend;
 
        if (backend->conn != NULL)
                smtp_client_connection_cork(backend->conn);
 }
-void client_proxy_input_post(struct client *client)
+static void
+backend_relay_client_input_post(struct submission_backend *_backend)
 {
-       struct submission_backend_relay *backend = &client->backend;
+       struct submission_backend_relay *backend =
+               (struct submission_backend_relay *)_backend;
 
        if (backend->conn != NULL)
                smtp_client_connection_uncork(backend->conn);
@@ -873,6 +877,9 @@ static struct submission_backend_vfuncs backend_relay_vfuncs = {
 
        .start = backend_relay_start,
 
+       .client_input_pre = backend_relay_client_input_pre,
+       .client_input_post = backend_relay_client_input_post,
+
        .cmd_helo = backend_relay_cmd_helo,
 
        .cmd_mail = backend_relay_cmd_mail,
index db08c147ace28f88829273871fd495c67329ddd7..ee55dd36d383ccc0db4b8fb3ed85cede4c17d765 100644 (file)
@@ -18,9 +18,6 @@ struct submission_backend_relay {
 void client_proxy_create(struct client *client,
                         const struct submission_settings *set);
 
-void client_proxy_input_pre(struct client *client);
-void client_proxy_input_post(struct client *client);
-
 uoff_t client_proxy_get_max_mail_size(struct client *client);
 
 #endif
index 807c27d901ab6e662ac5764207ad1626f7f7e1e4..df9cec1353098674af3b117786c0e81bbf7c6f84 100644 (file)
@@ -49,14 +49,12 @@ static void client_input_pre(void *context)
 {
        struct client *client = context;
 
-       client_proxy_input_pre(client);
        submission_backends_client_input_pre(client);
 }
 static void client_input_post(void *context)
 {
        struct client *client = context;
 
-       client_proxy_input_post(client);
        submission_backends_client_input_post(client);
 }