diff options
author | Debarshi Ray <debarshir@gnome.org> | 2018-04-17 15:43:59 +0200 |
---|---|---|
committer | Debarshi Ray <debarshir@gnome.org> | 2018-04-17 15:59:26 +0200 |
commit | 548de336b3c6b31466d0576c184f2a5ad5d6d421 (patch) | |
tree | 5ab027363a5723dd9c645bfc21a6cfa2cf00b30f | |
parent | 1ac2bd8c8ffd4c799a2f3629ebc40d14f636b80c (diff) | |
download | gnome-online-accounts-548de336b3c6b31466d0576c184f2a5ad5d6d421.tar.gz |
Revert "daemon: Add a synchronous version of goa_provider_get_all"
This was only necessary to initialize the backends at startup. The
Telepathy provider was the only backend that needed initialization,
and it has now been removed.
This reverts commit ee7318aab581d42f743122240581ff986bd6e30e.
https://bugzilla.gnome.org/show_bug.cgi?id=795322
-rw-r--r-- | src/daemon/goadaemon.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/daemon/goadaemon.c b/src/daemon/goadaemon.c index 903af2e..bfc5f86 100644 --- a/src/daemon/goadaemon.c +++ b/src/daemon/goadaemon.c @@ -91,52 +91,6 @@ static void goa_daemon_reload_configuration (GoaDaemon *self); G_DEFINE_TYPE (GoaDaemon, goa_daemon, G_TYPE_OBJECT); -/* ---------------------------------------------------------------------------------------------------- */ - -typedef struct -{ - GError **error; - GList **out_providers; - GMainLoop *loop; - gboolean op_res; -} GetAllSyncData; - -static void -get_all_providers_sync_cb (GObject *source_object, - GAsyncResult *res, - gpointer user_data) -{ - GetAllSyncData *data = (GetAllSyncData *) user_data; - - data->op_res = goa_provider_get_all_finish (data->out_providers, res, data->error); - g_main_loop_quit (data->loop); -} - -static gboolean -get_all_providers_sync (GCancellable *cancellable, - GList **out_providers, - GError **error) -{ - GetAllSyncData data; - - data.error = error; - data.out_providers = out_providers; - - /* HACK: Since telepathy-glib doesn't use the thread-default - * GMainContext for invoking the asynchronous callbacks, we can't - * push a new GMainContext here. - */ - data.loop = g_main_loop_new (NULL, FALSE); - - goa_provider_get_all (get_all_providers_sync_cb, &data); - g_main_loop_run (data.loop); - g_main_loop_unref (data.loop); - - return data.op_res; -} - -/* ---------------------------------------------------------------------------------------------------- */ - static void goa_daemon_constructed (GObject *object) { |