[Spice-commits] src/channel-main.c
Jonathon Jongsma
jjongsma at kemper.freedesktop.org
Thu Nov 19 12:36:34 PST 2015
src/channel-main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit df331737d1c9ab5e680dfb3fd91897f3179cf4b6
Author: Jay.han <ezzzehxx at gmail.com>
Date: Wed Nov 18 14:24:13 2015 -0600
file transfer: send cancel message when user cancels a transfer
When a user cancel's a file transfer, we should send a STATUS_CANCELED
message rather than an STATUS_ERROR message. The latter triggers a bug
in the vdagent where the file remains opened by the vdagent in the guest
and cannot be removed.
Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
diff --git a/src/channel-main.c b/src/channel-main.c
index 8138fd5..18c9b18 100644
--- a/src/channel-main.c
+++ b/src/channel-main.c
@@ -1922,7 +1922,8 @@ static void file_xfer_read_cb(GObject *source_object,
} else if (error) {
VDAgentFileXferStatusMessage msg = {
.id = self->priv->id,
- .result = VD_AGENT_FILE_XFER_STATUS_ERROR,
+ .result = error->code == G_IO_ERROR_CANCELLED ?
+ VD_AGENT_FILE_XFER_STATUS_CANCELLED : VD_AGENT_FILE_XFER_STATUS_ERROR,
};
agent_msg_queue_many(self->priv->channel, VD_AGENT_FILE_XFER_STATUS,
&msg, sizeof(msg), NULL);
More information about the Spice-commits
mailing list