[Spice-devel] [PATCH spice-gtk 2/4] channel-main: Send an error to the agent on file-xfer read error
Christophe Fergeau
cfergeau at redhat.com
Mon Mar 4 08:08:11 PST 2013
On Sun, Mar 03, 2013 at 05:52:03PM +0100, Hans de Goede wrote:
> So that the agent knows the rest of the file won't be coming.
>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
> 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);
agent_msg_queue() could be used here as well, but the current version is
fine with me, ACK.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130304/d3a9d31a/attachment.pgp>
More information about the Spice-devel
mailing list