[Spice-devel] [spice-gtk v5 15/23] file-xfer: do not send EOF to the agent
Victor Toso
lists at victortoso.com
Thu Jul 7 11:21:58 UTC 2016
Hi,
On Thu, Jul 07, 2016 at 11:37:46AM +0200, Christophe Fergeau wrote:
> Hey,
>
> On Tue, Jul 05, 2016 at 03:07:22PM +0200, Victor Toso wrote:
> > There is no need to send 0 bytes of data to the agent, we should just
> > wait for VD_AGENT_FILE_XFER_STATUS message.
>
> Have you checked https://bugzilla.redhat.com/show_bug.cgi?id=1135099 /
> ca151b5090e ?
>
> Christophe
Ah :(
I wonder why the fix of rhbz#1135099 is not in both agent instead. I'll
drop this patch for now and check the agent code later on.
Many thanks!
toso
>
> >
> > Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
> > ---
> > src/channel-main.c | 7 +++----
> > 1 file changed, 3 insertions(+), 4 deletions(-)
> >
> > diff --git a/src/channel-main.c b/src/channel-main.c
> > index fa5b611..7d00154 100644
> > --- a/src/channel-main.c
> > +++ b/src/channel-main.c
> > @@ -1948,14 +1948,13 @@ static void file_xfer_read_async_cb(GObject *source_object,
> > spice_channel_wakeup(SPICE_CHANNEL(channel), FALSE);
> > spice_file_transfer_task_completed(xfer_task, error);
> > return;
> > - }
> > -
> > - file_xfer_queue_msg_to_agent(channel, spice_file_transfer_task_get_id(xfer_task), buffer, count);
> > - if (count == 0) {
> > + } else if (count == 0) {
> > /* on EOF just wait for VD_AGENT_FILE_XFER_STATUS from agent */
> > return;
> > }
> >
> > + file_xfer_queue_msg_to_agent(channel, spice_file_transfer_task_get_id(xfer_task), buffer, count);
> > +
> > task_id = spice_file_transfer_task_get_id(xfer_task);
> > xfer_op = g_hash_table_lookup(channel->priv->file_xfer_tasks, GUINT_TO_POINTER(task_id));
> > xfer_op->stats.total_sent += count;
> > --
> > 2.7.4
> >
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/spice-devel
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
More information about the Spice-devel
mailing list