Re: Usb redirection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 12/24/2012 04:20 AM, Jackson wrote:
Thanks, now I can use libusb_handle_events().

What kind of situation the code will run into
int usbredirparser_do_write(struct usbredirparser *parser_pub)
{
...
    if ((parser->flags & usbredirparser_fl_write_cb_owns_buffer) &&
                 w != wbuf->len)
             abort();
...
}

If the user of libusbredirparser / libusbredirhost uses the
write_cb_owns_buffer flag *and* then its write function does not
either accept the entire message, or none, but instead accepts
only part of it. Only partially consuming a buffer is not allowed
for users which specify the write_cb_owns_buffer flag, as documented
in the header file.

with spice-gtk the abort() you quoted above should never trigger.

Regards,

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