From 834e3b7f7e5e7632ed9c0117d6cf633ef9c34213 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 25 Jun 2001 15:40:30 +0000 Subject: Fix this: IMAP doesn't allow an extra argument to AUTHENTICATE to avoid a * providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP doesn't allow an extra argument to AUTHENTICATE to avoid a useless round trip like some other SASL bindings do. * providers/imap/camel-imap-command.c (imap_read_response): Deal with IMAP servers that (incorrectly) return "+\r\n" rather than "+ \r\n" for an empty continuation response. (camel_imap_response_extract_continuation): Likewise. svn path=/trunk/; revision=10480 --- camel/providers/imap/camel-imap-store.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'camel/providers/imap/camel-imap-store.c') diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index d16a7e4a4c..eecc7b0e35 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -391,16 +391,12 @@ try_auth (CamelImapStore *store, const char *mech, CamelException *ex) CAMEL_IMAP_STORE_ASSERT_LOCKED (store, command_lock); - sasl = camel_sasl_new ("imap", mech, CAMEL_SERVICE (store)); - - sasl_resp = camel_sasl_challenge_base64 (sasl, NULL, ex); - - response = camel_imap_command (store, NULL, ex, "AUTHENTICATE %s%s%s", - mech, sasl_resp ? " " : "", - sasl_resp ? sasl_resp : ""); + response = camel_imap_command (store, NULL, ex, + "AUTHENTICATE %s", mech); if (!response) - goto lose; + return FALSE; + sasl = camel_sasl_new ("imap", mech, CAMEL_SERVICE (store)); while (!camel_sasl_authenticated (sasl)) { resp = camel_imap_response_extract_continuation (store, response, ex); if (!resp) -- cgit v1.2.3