[gnome-online-accounts/gnome-3-6] exchange: Fix GError handing in ensure_credentials_sync



commit d0e4f09662fc18fbf83f698144761b1d8968d043
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Nov 5 12:56:13 2012 +0100

    exchange: Fix GError handing in ensure_credentials_sync

 src/goabackend/goaexchangeprovider.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/goabackend/goaexchangeprovider.c b/src/goabackend/goaexchangeprovider.c
index a51601c..e3f1d00 100644
--- a/src/goabackend/goaexchangeprovider.c
+++ b/src/goabackend/goaexchangeprovider.c
@@ -292,9 +292,10 @@ ensure_credentials_sync (GoaProvider         *provider,
     {
       if (error != NULL)
         {
-          g_prefix_error (error, _("Did not find password with username `%s' in credentials"), username);
-          (*error)->domain = GOA_ERROR;
-          (*error)->code = GOA_ERROR_NOT_AUTHORIZED;
+          *error = g_error_new (GOA_ERROR,
+                                GOA_ERROR_NOT_AUTHORIZED,
+                                _("Did not find password with username `%s' in credentials"),
+                                username);
         }
       goto out;
     }



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