[evolution-data-server] Bug 774841 - [EWebDAVDiscover] One part failure caused credentials reject



commit c31e781b3eeec76b477441a07dda9ac6e81f9051
Author: Milan Crha <mcrha redhat com>
Date:   Thu Dec 1 19:07:37 2016 +0100

    Bug 774841 - [EWebDAVDiscover] One part failure caused credentials reject

 src/libedataserver/e-webdav-discover.c             |    6 +++++-
 src/modules/google-backend/module-google-backend.c |    2 ++
 .../owncloud-backend/module-owncloud-backend.c     |    2 ++
 3 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/libedataserver/e-webdav-discover.c b/src/libedataserver/e-webdav-discover.c
index b5db819..b25577a 100644
--- a/src/libedataserver/e-webdav-discover.c
+++ b/src/libedataserver/e-webdav-discover.c
@@ -441,8 +441,12 @@ e_webdav_discover_check_successful (SoupMessage *message,
                        error_code = G_IO_ERROR_NOT_FOUND;
                        break;
                case SOUP_STATUS_UNAUTHORIZED:
-               case SOUP_STATUS_PAYMENT_REQUIRED:
                case SOUP_STATUS_FORBIDDEN:
+                       g_set_error (
+                               error, SOUP_HTTP_ERROR, message->status_code,
+                               _("HTTP Error: %s"), message->reason_phrase);
+                       return FALSE;
+               case SOUP_STATUS_PAYMENT_REQUIRED:
                        error_code = G_IO_ERROR_PERMISSION_DENIED;
                        break;
                case SOUP_STATUS_REQUEST_TIMEOUT:
diff --git a/src/modules/google-backend/module-google-backend.c 
b/src/modules/google-backend/module-google-backend.c
index 1141fc6..6b7c01d 100644
--- a/src/modules/google-backend/module-google-backend.c
+++ b/src/modules/google-backend/module-google-backend.c
@@ -551,6 +551,8 @@ google_backend_authenticate_sync (EBackend *backend,
                        g_hash_table_foreach (known_sources, google_remove_unknown_sources_cb, server);
                        g_object_unref (server);
                }
+
+               g_clear_error (&local_error);
        }
 
        if (local_error == NULL) {
diff --git a/src/modules/owncloud-backend/module-owncloud-backend.c 
b/src/modules/owncloud-backend/module-owncloud-backend.c
index 8fc5b0f..27b6980 100644
--- a/src/modules/owncloud-backend/module-owncloud-backend.c
+++ b/src/modules/owncloud-backend/module-owncloud-backend.c
@@ -380,6 +380,8 @@ owncloud_backend_authenticate_sync (EBackend *backend,
                        g_hash_table_foreach (known_sources, owncloud_remove_unknown_sources_cb, server);
                        g_object_unref (server);
                }
+
+               g_clear_error (&local_error);
        }
 
        if (local_error == NULL) {


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