summaryrefslogtreecommitdiff
path: root/daemon/mount.c
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2012-04-18 15:37:00 +0200
committerTomas Bzatek <tbzatek@redhat.com>2012-07-31 11:59:36 +0200
commitc85c4a0459d70a7331a3beb2336c789a55dad595 (patch)
treea36b704e77377e09037d6cb0d3480b2d421fd3b0 /daemon/mount.c
parent838a1d9fb187fc759cb6a76303b2a754d427df5f (diff)
downloadgvfs-c85c4a0459d70a7331a3beb2336c789a55dad595.tar.gz
gdbus: Handle not yet spawned mountables
This makes http backend working again.
Diffstat (limited to 'daemon/mount.c')
-rw-r--r--daemon/mount.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/daemon/mount.c b/daemon/mount.c
index 1a30adf7..58eecc92 100644
--- a/daemon/mount.c
+++ b/daemon/mount.c
@@ -282,19 +282,16 @@ dbus_mount_reply (GVfsDBusMountable *proxy,
res,
&error))
{
- g_warning ("dbus_mount_reply: Error from org.gtk.vfs.Mountable.mount(): %s", error->message);
- g_warning ("dbus_mount_reply: TODO handle not spawned");
-
- /* FIXME: handle NOT_SPAWNED */
-#if 0
- if ((dbus_message_is_error (reply, DBUS_ERROR_NAME_HAS_NO_OWNER) ||
- dbus_message_is_error (reply, DBUS_ERROR_SERVICE_UNKNOWN)) &&
- !data->spawned)
+ if ((g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_NAME_HAS_NO_OWNER) ||
+ g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN)) &&
+ !data->spawned)
spawn_mount (data);
-#endif
-
- mount_finish (data, error);
- g_error_free (error);
+ else
+ {
+ g_warning ("dbus_mount_reply: Error from org.gtk.vfs.Mountable.mount(): %s", error->message);
+ mount_finish (data, error);
+ g_error_free (error);
+ }
}
else
{
@@ -326,14 +323,12 @@ mountable_mount_proxy_cb (GObject *source_object,
g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (proxy),
G_VFS_DBUS_MOUNT_TIMEOUT_MSECS);
- g_print ("mountable_mount_with_name: before call_mount\n");
gvfs_dbus_mountable_call_mount (proxy,
g_mount_spec_to_dbus (data->mount_spec),
data->automount,
g_mount_source_to_dbus (data->source),
NULL,
(GAsyncReadyCallback) dbus_mount_reply, data);
- g_print ("mountable_mount_with_name: after call_mount\n");
g_object_unref (proxy);
}