[PATCH spice-gtk 2/4] channel-main: Send an error to the agent on file-xfer read error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So that the agent knows the rest of the file won't be coming.

Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
---
 gtk/channel-main.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index 531b1e8..6a29ce8 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -1632,6 +1632,13 @@ static void file_xfer_read_cb(GObject *source_object,
     } else {
         /* Error or EOF, close the file */
         if (error) {
+            VDAgentFileXferStatusMessage msg = {
+                .id = task->id,
+                .result = VD_AGENT_FILE_XFER_STATUS_ERROR,
+            };
+            agent_msg_queue_many(task->channel, VD_AGENT_FILE_XFER_STATUS,
+                                 &msg, sizeof(msg), NULL);
+            spice_channel_wakeup(SPICE_CHANNEL(task->channel), FALSE);
             task->error = error;
         }
         g_input_stream_close_async(G_INPUT_STREAM(task->file_stream),
-- 
1.8.1.2

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]