Re: [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]

 



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@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);

agent_msg_queue() could be used here as well, but the current version is
fine with me, ACK.

Christophe

Attachment: pgpKJSmTcgZEU.pgp
Description: PGP signature

_______________________________________________
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]