mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 20:33:54 -06:00
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
1 changed files with 7 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue