[gnome-online-accounts/gnome-3-6] exchange: Set GOA_ERROR_NOT_AUTHORIZED if password is invalid



commit 8a849d6755f611c48ba1770804f7fe16025db6df
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Nov 5 13:41:41 2012 +0100

    exchange: Set GOA_ERROR_NOT_AUTHORIZED if password is invalid
    
    Fixes: https://bugzilla.gnome.org/687632

 src/goabackend/goaexchangeprovider.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/goabackend/goaexchangeprovider.c b/src/goabackend/goaexchangeprovider.c
index e3f1d00..e4cee45 100644
--- a/src/goabackend/goaexchangeprovider.c
+++ b/src/goabackend/goaexchangeprovider.c
@@ -311,6 +311,21 @@ ensure_credentials_sync (GoaProvider         *provider,
                                           server,
                                           cancellable,
                                           error);
+  if (!ret)
+    {
+      if (error != NULL)
+        {
+          g_prefix_error (error,
+                          _("Invalid password with username `%s' (%s, %d): "),
+                          username,
+                          g_quark_to_string ((*error)->domain),
+                          (*error)->code);
+          (*error)->domain = GOA_ERROR;
+          (*error)->code = GOA_ERROR_NOT_AUTHORIZED;
+        }
+      goto out;
+    }
+
   if (out_expires_in != NULL)
     *out_expires_in = 0;
 



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