[Spice-devel] [PATCH spice] server: Add a usbredir channel
Alon Levy
alevy at redhat.com
Fri Aug 12 11:27:12 PDT 2011
On Thu, Aug 11, 2011 at 09:45:40AM +0200, Hans de Goede wrote:
> Hi,
>
> On 08/11/2011 08:33 AM, Alon Levy wrote:
>
> <snip snip>
>
> >>+static void usbredir_chardev_wakeup(SpiceCharDeviceInstance *sin)
> >>+{
> >>+ UsbRedirState *state;
> >>+ SpiceCharDeviceInterface *sif;
> >>+ int n;
> >>+
> >>+ state = SPICE_CONTAINEROF(sin->st, UsbRedirState, chardev_st);
> >>+ sif = SPICE_CONTAINEROF(sin->base.sif, SpiceCharDeviceInterface, base);
> >>+
> >>+ if (!state->red_channel) {
> >
> >Can this happen? i.e. usb data from qemu without a channel? shouldn't this at
> >least print a warning? (but it may be too frequent if it actually happens - don't
> >know, didn't test, and didn't read the qemu bits).
>
> Yes, usb-redir.c in qemu uses a bh handler to handle the actual close,
> so between the chardev close event generated when red_channel gets
> disconnect and it actually handling the close it may still try to send data.
>
ok, after being reassured offline that this is not an error condition, no data loss,
the patch looks fine otherwise, so
ACK
> Regards,
>
> Hans
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
More information about the Spice-devel
mailing list