[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 2f102819422ec365d47a45c469c5747b3141074e
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

 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]