[Spice-devel] [PATCH spice] server: Add a usbredir channel
Hans de Goede
hdegoede at redhat.com
Thu Aug 11 00:45:40 PDT 2011
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.
Regards,
Hans
More information about the Spice-devel
mailing list