diff options
author | Ondrej Holy <oholy@redhat.com> | 2015-05-11 19:18:34 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2017-11-28 14:51:56 +0100 |
commit | e28e7c2d7feedd8673e0aaa6b006447830854db5 (patch) | |
tree | c1937d59610ab7de5bbbd6b1cd4aa1835d982873 /daemon/gvfsjobunmount.c | |
parent | 08612cd495fd3a10e83041dd2245385d05a24e07 (diff) | |
download | gvfs-e28e7c2d7feedd8673e0aaa6b006447830854db5.tar.gz |
daemon: Port GVfsBackend to GTask
GSimpleAsyncResult is deprecated in favour of GTask and should be replaced.
This patch also introduce g_vfs_backend_register_mount_finish() and
g_vfs_backend_unregister_mount_finish() functions to make the code
nicer.
Based on patch from Dan Winship.
https://bugzilla.gnome.org/show_bug.cgi?id=747412
Diffstat (limited to 'daemon/gvfsjobunmount.c')
-rw-r--r-- | daemon/gvfsjobunmount.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/daemon/gvfsjobunmount.c b/daemon/gvfsjobunmount.c index af6db0db..7a58c345 100644 --- a/daemon/gvfsjobunmount.c +++ b/daemon/gvfsjobunmount.c @@ -287,27 +287,22 @@ try (GVfsJob *job) } static void -unregister_mount_callback (GVfsDBusMountTracker *proxy, +unregister_mount_callback (GVfsBackend *backend, GAsyncResult *res, gpointer user_data) { - GVfsBackend *backend; GVfsDaemon *daemon; GVfsJobUnmount *op_job = G_VFS_JOB_UNMOUNT (user_data); GError *error = NULL; g_debug ("unregister_mount_callback\n"); - if (! gvfs_dbus_mount_tracker_call_unregister_mount_finish (proxy, - res, - &error)) + if (!g_vfs_backend_unregister_mount_finish (backend, res, &error)) { - g_dbus_error_strip_remote_error (error); g_warning ("Error unregistering mount: %s (%s, %d)\n", error->message, g_quark_to_string (error->domain), error->code); g_error_free (error); } - backend = op_job->backend; (*G_VFS_JOB_CLASS (g_vfs_job_unmount_parent_class)->send_reply) (G_VFS_JOB (op_job)); /* Unlink job source from daemon */ |