summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-03-17 16:32:49 +0000
committerAlexander Larsson <alexl@src.gnome.org>2009-03-17 16:32:49 +0000
commit1d09796658be1824f54bda01b5ad8649a461b5a5 (patch)
tree6d9961cd51b9dfae856ce17198dd65eedbfbee64 /monitor
parent621d3f7d6153e9cffe787632cc404907465898ab (diff)
downloadgvfs-1d09796658be1824f54bda01b5ad8649a461b5a5.tar.gz
Don't unref the real mount directly when we're unshadowed, because that
2009-03-17 Alexander Larsson <alexl@redhat.com> * monitor/proxy/gproxyshadowmount.c: (g_proxy_shadow_mount_remove): Don't unref the real mount directly when we're unshadowed, because that means most functions in the shadow mount won't work in the removed signal emissions. This caused lots of spew in e.g. gvfs-mount -oi on unmount of a shadowed mount. svn path=/trunk/; revision=2339
Diffstat (limited to 'monitor')
-rw-r--r--monitor/proxy/gproxyshadowmount.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/monitor/proxy/gproxyshadowmount.c b/monitor/proxy/gproxyshadowmount.c
index bcf5f221..dcd27a1d 100644
--- a/monitor/proxy/gproxyshadowmount.c
+++ b/monitor/proxy/gproxyshadowmount.c
@@ -49,6 +49,7 @@ struct _GProxyShadowMount {
GProxyVolume *volume;
GMount *real_mount;
+ gboolean real_mount_shadowed;
GFile *root;
};
@@ -73,6 +74,12 @@ g_proxy_shadow_mount_finalize (GObject *object)
g_proxy_shadow_mount_remove (mount);
+ if (mount->real_mount != NULL)
+ {
+ g_object_unref (mount->real_mount);
+ mount->real_mount = NULL;
+ }
+
if (mount->volume_monitor != NULL)
g_object_unref (mount->volume_monitor);
@@ -107,13 +114,12 @@ g_proxy_shadow_mount_init (GProxyShadowMount *proxy_shadow_mount)
void
g_proxy_shadow_mount_remove (GProxyShadowMount *mount)
{
- if (mount->real_mount != NULL)
+ if (mount->real_mount_shadowed)
{
g_mount_unshadow (mount->real_mount);
signal_emit_in_idle (mount->real_mount, "changed", NULL);
signal_emit_in_idle (mount->volume_monitor, "mount-changed", mount->real_mount);
- g_object_unref (mount->real_mount);
- mount->real_mount = NULL;
+ mount->real_mount_shadowed = FALSE;
}
}
@@ -138,6 +144,7 @@ g_proxy_shadow_mount_new (GProxyVolumeMonitor *volume_monitor,
mount->volume_monitor = g_object_ref (volume_monitor);
mount->volume = g_object_ref (volume);
mount->real_mount = g_object_ref (real_mount);
+ mount->real_mount_shadowed = TRUE;
mount->root = activation_root;
g_mount_shadow (mount->real_mount);