[gnome-online-accounts/wip/rishi/daemon-add-account-missing-error: 1/2] daemon: Return a D-Bus error if AddAccount fails to list all providers



commit a173a70f854564caefcada45c34d46f059d085a6
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Aug 5 18:12:23 2019 +0200

    daemon: Return a D-Bus error if AddAccount fails to list all providers
    
    Fallout from 1a8bfdf90fd24e9bbaeeae15ff9f16e847a6b48e
    
    https://gitlab.gnome.org/GNOME/gnome-online-accounts/merge_requests/29

 src/daemon/goadaemon.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/daemon/goadaemon.c b/src/daemon/goadaemon.c
index 63088d2d..f20831e2 100644
--- a/src/daemon/goadaemon.c
+++ b/src/daemon/goadaemon.c
@@ -1105,8 +1105,13 @@ get_all_providers_cb (GObject      *source,
 
   /* TODO: could check for @type */
 
-  if (!goa_provider_get_all_finish (&providers, res, NULL))
-    goto out;
+  error = NULL;
+  if (!goa_provider_get_all_finish (&providers, res, &error))
+    {
+      g_prefix_error (&error, "Error getting all providers: ");
+      g_dbus_method_invocation_take_error (data->invocation, error);
+      goto out;
+    }
 
   for (l = providers; l != NULL; l = l->next)
     {


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