diff options
author | Timothy Arceri <t_arceri@yahoo.com.au> | 2013-04-20 21:10:00 +1000 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-05-06 16:36:11 +0200 |
commit | 8c5d70c411d3b7f0c0622e0a73567e83b2745249 (patch) | |
tree | 662e345523404768d2caa9aa54f02e198174af47 /daemon/daemon-main.c | |
parent | 238a92496f5ab165b52f90d414379525cb262ee1 (diff) | |
download | gvfs-8c5d70c411d3b7f0c0622e0a73567e83b2745249.tar.gz |
Adds remaining shutdown infrastructure and call from cdda backend.
https://bugzilla.gnome.org/show_bug.cgi?id=511802
Diffstat (limited to 'daemon/daemon-main.c')
-rw-r--r-- | daemon/daemon-main.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/daemon/daemon-main.c b/daemon/daemon-main.c index de007b09..4b2d5419 100644 --- a/daemon/daemon-main.c +++ b/daemon/daemon-main.c @@ -313,6 +313,14 @@ on_name_lost (GDBusConnection *connection, } static void +daemon_shutdown (GVfsDaemon *daemon, + GMainLoop *loop) +{ + if (g_main_loop_is_running (loop)) + g_main_loop_quit (loop); +} + +static void on_name_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data) @@ -329,6 +337,8 @@ on_name_acquired (GDBusConnection *connection, } g_vfs_daemon_set_max_threads (data->daemon, data->max_job_threads); + g_signal_connect (data->daemon, "shutdown", + G_CALLBACK (daemon_shutdown), loop); send_spawned (TRUE, NULL, 0, spawned_succeeded_cb, data); } @@ -391,7 +401,7 @@ daemon_main (int argc, { g_idle_add (do_name_acquired, data); } - + g_main_loop_run (loop); g_clear_object (&data->daemon); |