[evolution-data-server] Bug 768000 - [POP3] Make it understand Google authentication mechanism
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 768000 - [POP3] Make it understand Google authentication mechanism
- Date: Thu, 30 Jun 2016 19:19:37 +0000 (UTC)
commit d5b89f557a9de169ab5101517042e2d8b5647c17
Author: Milan Crha <mcrha redhat com>
Date: Thu Jun 30 21:17:40 2016 +0200
Bug 768000 - [POP3] Make it understand Google authentication mechanism
camel/providers/pop3/camel-pop3-store.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index 5b8e456..297f4db 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -310,7 +310,7 @@ try_sasl (CamelPOP3Store *store,
goto exit;
}
- string = g_strdup_printf ("AUTH %s\r\n", mechanism);
+ string = g_strdup_printf ("AUTH %s\r\n", g_strcmp0 (mechanism, "Google") == 0 ? "XOAUTH2" :
mechanism);
ret = camel_stream_write_string (
CAMEL_STREAM (pop3_stream), string, cancellable, error);
g_free (string);
@@ -766,12 +766,16 @@ pop3_store_authenticate_sync (CamelService *service,
} else {
GList *link;
+ const gchar *test_mechanism = mechanism;
+
+ if (g_strcmp0 (test_mechanism, "Google") == 0)
+ test_mechanism = "XOAUTH2";
link = pop3_engine->auth;
while (link != NULL) {
CamelServiceAuthType *auth = link->data;
- if (g_strcmp0 (auth->authproto, mechanism) == 0) {
+ if (g_strcmp0 (auth->authproto, test_mechanism) == 0) {
result = try_sasl (
store, mechanism,
cancellable, error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]