[evolution-data-server] SMTP: Handle 235 code after initial AUTH command.



commit bb2e7b131e9a67a30e3412ee23a6ddded6239375
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Jun 24 18:51:22 2011 -0400

    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.

 camel/providers/smtp/camel-smtp-transport.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
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 (



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]