[evolution-data-server] Bug 784548 - Collection credentials used for different SMTP server
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 784548 - Collection credentials used for different SMTP server
- Date: Mon, 10 Jul 2017 16:18:45 +0000 (UTC)
commit 044b0969cebb8c7fb75148c06392c00664d37b89
Author: Milan Crha <mcrha redhat com>
Date: Mon Jul 10 18:15:59 2017 +0200
Bug 784548 - Collection credentials used for different SMTP server
src/libedataserver/e-source-credentials-provider.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/libedataserver/e-source-credentials-provider.c
b/src/libedataserver/e-source-credentials-provider.c
index f30b186..7eea898 100644
--- a/src/libedataserver/e-source-credentials-provider.c
+++ b/src/libedataserver/e-source-credentials-provider.c
@@ -480,6 +480,20 @@ e_source_credentials_provider_ref_credentials_source (ESourceCredentialsProvider
both are filled and they do not match, thus do not use collection. */
can_use_collection = (host_collection && *host_collection && (!host_source ||
!*host_source)) ||
(host_source && *host_source && (!host_collection ||
!*host_collection));
+
+ if (can_use_collection) {
+ gchar *method_source, *method_collection;
+
+ /* Also check the method; if different, then rather not use the
collection */
+ method_source = e_source_authentication_dup_method (auth_source);
+ method_collection = e_source_authentication_dup_method
(auth_collection);
+
+ can_use_collection = !method_source || !method_collection ||
+ g_ascii_strcasecmp (method_source, method_collection) == 0;
+
+ g_free (method_source);
+ g_free (method_collection);
+ }
}
g_free (host_source);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]