[gvfs] daemon: Also block active channels if the backend is blocked
- From: Christian Kellner <gicmo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] daemon: Also block active channels if the backend is blocked
- Date: Tue, 7 Jun 2011 12:36:12 +0000 (UTC)
commit f54e2164e6d94001edf976f270e66b1e0b9cb8e0
Author: Christian Kellner <gicmo gnome org>
Date: Sat Jun 4 13:06:10 2011 +0200
daemon: Also block active channels if the backend is blocked
Let the GVfsChannel pick up the blocked state from the backend.
daemon/gvfschannel.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gvfschannel.c b/daemon/gvfschannel.c
index f746f55..b5e3d6a 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]