summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kellner <gicmo@gnome.org>2011-06-04 13:06:10 +0200
committerChristian Kellner <gicmo@gnome.org>2011-06-06 14:40:45 +0200
commitf54e2164e6d94001edf976f270e66b1e0b9cb8e0 (patch)
tree20a3e92019b18af1078bc6d8e86e7b20cd969865
parentad431e0540bfe11fcdc79093bb29361b7d2250d4 (diff)
downloadgvfs-f54e2164e6d94001edf976f270e66b1e0b9cb8e0.tar.gz
daemon: Also block active channels if the backend is blocked
Let the GVfsChannel pick up the blocked state from the backend.
-rw-r--r--daemon/gvfschannel.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/daemon/gvfschannel.c b/daemon/gvfschannel.c
index f746f558..b5e3d6a7 100644
--- a/daemon/gvfschannel.c
+++ b/daemon/gvfschannel.c
@@ -362,6 +362,22 @@ got_request (GVfsChannel *channel,
guint32 command, arg1;
GList *l;
+ if (g_vfs_backend_get_block_requests (channel->priv->backend))
+ {
+ char *data;
+ gsize data_len;
+ GError *err = NULL;
+ guint32 seq_nr;
+
+ g_set_error_literal (&err, G_IO_ERROR, G_IO_ERROR_CLOSED,
+ "Channel blocked");
+ seq_nr = g_ntohl (request->seq_nr);
+ data = g_error_to_daemon_reply (err, seq_nr, &data_len);
+ g_vfs_channel_send_reply (channel, NULL, data, data_len);
+ g_error_free (err);
+ return;
+ }
+
command = g_ntohl (request->command);
arg1 = g_ntohl (request->arg1);