[Spice-devel] [PATCH spice-gtk 15/16] channel-main: Cancel active file-xfers on channel/agent disconnect
Christophe Fergeau
cfergeau at redhat.com
Tue Apr 9 02:50:02 PDT 2013
On Fri, Mar 29, 2013 at 12:40:27PM +0100, Hans de Goede wrote:
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
> gtk/channel-main.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/gtk/channel-main.c b/gtk/channel-main.c
> index 7513ead..01c0659 100644
> --- a/gtk/channel-main.c
> +++ b/gtk/channel-main.c
> @@ -165,6 +165,7 @@ static gboolean main_migrate_handshake_done(gpointer data);
> static void spice_main_channel_send_migration_handshake(SpiceChannel *channel);
> static void file_xfer_continue_read(SpiceFileXferTask *task);
> static void file_xfer_completed(SpiceFileXferTask *task, GError *error);
> +static void file_xfer_flushed(SpiceMainChannel *channel, gboolean success);
>
> /* ------------------------------------------------------------------ */
>
> @@ -332,6 +333,8 @@ static void spice_channel_iterate_write(SpiceChannel *channel)
> static void spice_main_channel_reset_agent(SpiceMainChannel *channel)
> {
> SpiceMainChannelPrivate *c = channel->priv;
> + GError *error;
> + GList *l;
>
> c->agent_connected = FALSE;
> c->agent_caps_received = FALSE;
> @@ -340,6 +343,15 @@ static void spice_main_channel_reset_agent(SpiceMainChannel *channel)
> g_free(c->agent_msg_data);
> c->agent_msg_data = NULL;
> c->agent_msg_size = 0;
> +
> + for (l = c->file_xfer_task_list; l != NULL; l = l->next) {
> + SpiceFileXferTask *task = (SpiceFileXferTask *)l->data;
> +
> + error = g_error_new(SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
> + "Agent connection closed");
Maybe this should be marked as translatable? We're not consistent with that
throughout the code base :(
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/20130409/243136af/attachment.pgp>
More information about the Spice-devel
mailing list