[evolution-data-server] Bug 624003 - [SMTP] GMail password change not accepted first time
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 624003 - [SMTP] GMail password change not accepted first time
- Date: Fri, 6 Mar 2015 11:57:27 +0000 (UTC)
commit 56f77dc701476953e9c0ec4d4d1c4d6bb45e9c48
Author: Milan Crha <mcrha redhat com>
Date: Fri Mar 6 12:57:16 2015 +0100
Bug 624003 - [SMTP] GMail password change not accepted first time
camel/providers/smtp/camel-smtp-transport.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 5a0cc22..c23ee8e 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -646,9 +646,18 @@ smtp_transport_authenticate_sync (CamelService *service,
/* If our authentication data was rejected, destroy the
* password so that the user gets prompted to try again. */
- if (strncmp (respbuf, "535", 3) == 0)
+ if (strncmp (respbuf, "535", 3) == 0) {
result = CAMEL_AUTHENTICATION_REJECTED;
- else if (strncmp (respbuf, "235", 3) == 0)
+
+ /* Read the continuation, if the server returned it. */
+ while (respbuf && respbuf[3] == '-') {
+ g_free (respbuf);
+ respbuf = camel_stream_buffer_read_line (
+ CAMEL_STREAM_BUFFER (transport->istream),
+ cancellable, error);
+ d (fprintf (stderr, "[SMTP] received: %s\n", respbuf ? respbuf : "(null)"));
+ }
+ } else if (strncmp (respbuf, "235", 3) == 0)
result = CAMEL_AUTHENTICATION_ACCEPTED;
/* Catch any other errors. */
else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]