[Spice-devel] usbredirparser: fix EAGAIN error in *_do_write()

Victor Toso lists at victortoso.com
Sat Oct 15 12:36:29 UTC 2016


Hi,

On Sat, Oct 15, 2016 at 12:28:21PM +0000, Dmitriy Samborskiy wrote:
> > From your description looks like the patch is reversed.
>
> Yes, it's reversed, sorry.
>
> > I'm not that familiar with usbredir code but looking at the code
> > if usbredirparser_do_write returns 0 the server should just loop
> > again.
>
> You are right. I found this bug when I debugged the usbredir sources for RedHat/CentOS 7 SRPM package and it had this old code
>         w = parser->callb.write_func(parser->callb.priv,
>                                      wbuf->buf + wbuf->pos, w);
>         if (w <= 0) {
>             ret = -1;
>             break;
>         }
> where "w == 0" was treated as an erroneous case.
> So, my patch is for the old code. I overlooked that this error was
> already fixed in 2013 the current repository.Sorry, my fault. Never
> mind.(Redhat 7.x packages sometimes are very old, though. This is
> frustrating...)

You will be glad to know that we have rebased usbredir for rhel 7.3
https://bugzilla.redhat.com/show_bug.cgi?id=1033101

Cheers,
  toso

>
> Regards,
> Dmitriy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161015/e365e4ec/attachment.sig>


More information about the Spice-devel mailing list