From: Timo Sirainen Date: Wed, 15 Jan 2014 20:03:22 +0000 (-0500) Subject: imap-proxy: Recent changes caused CAPABILITY repeating with pipelining disabled. X-Git-Tag: 2.2.11~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41783dcf1bcd7118440c9c40a691a09fb98a9460;p=thirdparty%2Fdovecot%2Fcore.git imap-proxy: Recent changes caused CAPABILITY repeating with pipelining disabled. --- diff --git a/src/imap-login/client.h b/src/imap-login/client.h index 887c0c2177..1209402258 100644 --- a/src/imap-login/client.h +++ b/src/imap-login/client.h @@ -21,6 +21,7 @@ struct imap_client { unsigned int proxy_seen_banner:1; unsigned int skip_line:1; unsigned int id_logged:1; + unsigned int proxy_capability_request_sent:1; unsigned int client_ignores_capability_resp_code:1; unsigned int auth_mech_name_parsed:1; }; diff --git a/src/imap-login/imap-proxy.c b/src/imap-login/imap-proxy.c index db299c485f..e0a491bd9b 100644 --- a/src/imap-login/imap-proxy.c +++ b/src/imap-login/imap-proxy.c @@ -69,8 +69,10 @@ static int proxy_write_login(struct imap_client *client, string_t *str) it), send the (unnecessary) CAPABILITY command to backend as well to avoid sending the CAPABILITY reply twice (untagged and OK resp code). */ - if (client->proxy_backend_capability == NULL || - client->client_ignores_capability_resp_code) { + if (!client->proxy_capability_request_sent && + (client->proxy_backend_capability == NULL || + client->client_ignores_capability_resp_code)) { + client->proxy_capability_request_sent = TRUE; str_append(str, "C CAPABILITY\r\n"); if (client->common.proxy_nopipelining) { /* authenticate only after receiving C OK reply. */