diff options
author | Tomas Bzatek <tbzatek@redhat.com> | 2012-04-18 16:58:48 +0200 |
---|---|---|
committer | Tomas Bzatek <tbzatek@redhat.com> | 2012-07-31 11:59:36 +0200 |
commit | a2c2c52928cd85fabcb7bf41476400ec4bb43611 (patch) | |
tree | 7f5085ae076c00fc9a88039e5e4cfdaed643d674 /daemon | |
parent | 261ddae0c195a072c7d1928a9450cc81116fc340 (diff) | |
download | gvfs-a2c2c52928cd85fabcb7bf41476400ec4bb43611.tar.gz |
gdbus: Silence unmount failures
...and fix wrong typecast due to using an object we haven't reff'ed. The
failure we're making silent were coming from a failed d-bus call to mount
tracker.
Also turned out the org.gtk.vfs.MountTracker.unregisterMount() has never
been implemented, daemon mounttracker is watching for clients disconnects
anyway.
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/gvfsjobunmount.c | 16 | ||||
-rw-r--r-- | daemon/mount.c | 1 |
2 files changed, 7 insertions, 10 deletions
diff --git a/daemon/gvfsjobunmount.c b/daemon/gvfsjobunmount.c index 7e79d691..ed78f5a1 100644 --- a/daemon/gvfsjobunmount.c +++ b/daemon/gvfsjobunmount.c @@ -277,20 +277,16 @@ unregister_mount_callback (GVfsDBusMountTracker *proxy, { GVfsBackend *backend; GVfsDaemon *daemon; - GVfsJob *job = G_VFS_JOB (user_data); GVfsJobUnmount *op_job = G_VFS_JOB_UNMOUNT (user_data); GError *error = NULL; - gvfs_dbus_mount_tracker_call_unregister_mount_finish (proxy, - res, - &error); - g_debug ("unregister_mount_callback, error: %p\n", error); - - if (error != NULL) + g_debug ("unregister_mount_callback\n"); + if (! gvfs_dbus_mount_tracker_call_unregister_mount_finish (proxy, + res, + &error)) { - /* If we failed before, don't overwrite the error as this one is not that important */ - if (! job->failed) - g_vfs_job_failed_from_error (job, error); + g_warning ("Error unregistering mount: %s (%s, %d)\n", + error->message, g_quark_to_string (error->domain), error->code); g_error_free (error); } diff --git a/daemon/mount.c b/daemon/mount.c index 47a41912..9649f0cf 100644 --- a/daemon/mount.c +++ b/daemon/mount.c @@ -1068,6 +1068,7 @@ mount_init (void) g_signal_connect (mount_tracker, "handle-list-mounts", G_CALLBACK (handle_list_mounts), NULL); g_signal_connect (mount_tracker, "handle-list-mountable-info", G_CALLBACK (handle_list_mountable_info), NULL); g_signal_connect (mount_tracker, "handle-list-mount-types", G_CALLBACK (handle_list_mount_types), NULL); + /* FIXME: handle unregisterMount() */ error = NULL; if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (mount_tracker), conn, |