mirror of https://gitee.com/openkylin/qemu.git
usb-redir: Notify our peer when we reject a device due to a speed mismatch
Also cleanup (reset) our device state when we reject a device due to a speed mismatch. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
8e24283b26
commit
714f9db06c
|
@ -836,7 +836,13 @@ static void usbredir_do_attach(void *opaque)
|
||||||
{
|
{
|
||||||
USBRedirDevice *dev = opaque;
|
USBRedirDevice *dev = opaque;
|
||||||
|
|
||||||
usb_device_attach(&dev->dev);
|
if (usb_device_attach(&dev->dev) != 0) {
|
||||||
|
usbredir_device_disconnect(dev);
|
||||||
|
if (usbredirparser_peer_has_cap(dev->parser, usb_redir_cap_filter)) {
|
||||||
|
usbredirparser_send_filter_reject(dev->parser);
|
||||||
|
usbredirparser_do_write(dev->parser);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue