[evolution-data-server] Bug 782377 - ESourceWebdav overrides ESourceAuthentication::method



commit 39e4a2d0a36a4798aaa53b4eedeb89a7f736aa12
Author: Milan Crha <mcrha redhat com>
Date:   Tue May 9 21:23:55 2017 +0200

    Bug 782377 - ESourceWebdav overrides ESourceAuthentication::method

 src/libedataserver/e-source-webdav.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/libedataserver/e-source-webdav.c b/src/libedataserver/e-source-webdav.c
index f5803d0..343982a 100644
--- a/src/libedataserver/e-source-webdav.c
+++ b/src/libedataserver/e-source-webdav.c
@@ -118,7 +118,8 @@ source_webdav_user_to_method (GBinding *binding,
        /* Be careful not to stomp on a custom method name.
         * Only change it under the following conditions:
         *
-        * 1) If "user" is empty, set "method" to "none".
+        * 1) If "user" is empty and "method" is empty,
+        *    set "method" to "none".
         * 2) If "user" is not empty and "method" is "none",
         *    set "method" to "plain/password" (corresponds
         *    to HTTP Basic authentication).
@@ -126,7 +127,7 @@ source_webdav_user_to_method (GBinding *binding,
         */
 
        user = g_value_get_string (source_value);
-       if (user == NULL || *user == '\0') {
+       if ((user == NULL || *user == '\0') && !*method) {
                g_value_set_string (target_value, "none");
        } else if (g_str_equal (method, "none")) {
                g_value_set_string (target_value, "plain/password");


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