[gvfs/gdbus-core: 15/17] gdbus: Silence unmount failures
- From: Tomas Bzatek <tbzatek src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/gdbus-core: 15/17] gdbus: Silence unmount failures
- Date: Mon, 4 Jun 2012 17:40:51 +0000 (UTC)
commit 67421512ba8842357175f5f9af88a93a759e01f2
Author: Tomas Bzatek <tbzatek redhat com>
Date: Wed Apr 18 16:58:48 2012 +0200
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.
daemon/gvfsjobunmount.c | 16 ++++++----------
daemon/mount.c | 1 +
2 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/daemon/gvfsjobunmount.c b/daemon/gvfsjobunmount.c
index 3593158..65398e9 100644
--- a/daemon/gvfsjobunmount.c
+++ b/daemon/gvfsjobunmount.c
@@ -219,20 +219,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 0d08b46..4d1c412 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]