[gvfs] Fix g_vfs_daemon_close_active_channels() to take a GVfsBackend argument and only close channels with
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] Fix g_vfs_daemon_close_active_channels() to take a GVfsBackend argument and only close channels with
- Date: Wed, 10 Apr 2013 07:49:32 +0000 (UTC)
commit ef65827c7962ad534b4d044354249d74a832e1d4
Author: Timothy Arceri <t_arceri yahoo com au>
Date: Tue Apr 9 16:48:27 2013 +1000
Fix g_vfs_daemon_close_active_channels() to take a GVfsBackend argument and only close channels with that
backend as a single daemon may handle multiple mounts/backends.
https://bugzilla.gnome.org/show_bug.cgi?id=511802
daemon/gvfsdaemon.c | 6 ++++--
daemon/gvfsjobunmount.c | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gvfsdaemon.c b/daemon/gvfsdaemon.c
index 7db8ad2..c0ac8ca 100644
--- a/daemon/gvfsdaemon.c
+++ b/daemon/gvfsdaemon.c
@@ -1029,11 +1029,13 @@ g_vfs_daemon_run_job_in_thread (GVfsDaemon *daemon,
}
void
-g_vfs_daemon_close_active_channels (GVfsDaemon *daemon)
+g_vfs_daemon_close_active_channels (GVfsDaemon *daemon,
+ GVfsBackend *backend)
{
GList *l;
for (l = daemon->job_sources; l != NULL; l = l->next)
- if (G_VFS_IS_CHANNEL (l->data))
+ if (G_VFS_IS_CHANNEL (l->data) &&
+ g_vfs_channel_get_backend (G_VFS_CHANNEL (l->data)) == backend)
g_vfs_channel_force_close (G_VFS_CHANNEL (l->data));
}
diff --git a/daemon/gvfsjobunmount.c b/daemon/gvfsjobunmount.c
index abf0097..d97f846 100644
--- a/daemon/gvfsjobunmount.c
+++ b/daemon/gvfsjobunmount.c
@@ -294,9 +294,9 @@ unregister_mount_callback (GVfsDBusMountTracker *proxy,
/* Unlink job source from daemon */
daemon = g_vfs_backend_get_daemon (backend);
+ g_vfs_daemon_close_active_channels (daemon, backend);
g_vfs_job_source_closed (G_VFS_JOB_SOURCE (backend));
- g_vfs_daemon_close_active_channels (daemon);
}
/* Might be called on an i/o thread */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]