From: Matthew Barnes Date: Fri, 24 Jun 2011 22:51:22 +0000 (-0400) Subject: SMTP: Handle 235 code after initial AUTH command. X-Git-Tag: upstream/3.7.4~1929 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb2e7b131e9a67a30e3412ee23a6ddded6239375;p=platform%2Fupstream%2Fevolution-data-server.git SMTP: Handle 235 code after initial AUTH command. The server may accept the initial response in our AUTH command and return a 235 (success) code without a 334 (continue) code, such as for example with XOAUTH. Handle this correctly. --- diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c index 40c95e9..5c7c95d 100644 --- a/camel/providers/smtp/camel-smtp-transport.c +++ b/camel/providers/smtp/camel-smtp-transport.c @@ -1210,6 +1210,10 @@ smtp_auth (CamelSmtpTransport *transport, goto lose; } + /* the server may have accepted our initial response */ + if (strncmp (respbuf, "235", 3) == 0) + break; + /* the server challenge/response should follow a 334 code */ if (strncmp (respbuf, "334", 3) != 0) { smtp_set_error (