mirror of
https://github.com/qemu/qemu.git
synced 2025-01-23 22:13:25 +08:00
usb-redir: Use reject rather the disconnect on bad ep info
So that the client gets a notification about us disconnecting the device. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
7e03d17816
commit
24ac283aa2
@ -1353,7 +1353,8 @@ static void usbredir_ep_info(void *priv,
|
||||
case usb_redir_type_interrupt:
|
||||
if (dev->endpoint[i].interval == 0) {
|
||||
ERROR("Received 0 interval for isoc or irq endpoint\n");
|
||||
usbredir_device_disconnect(dev);
|
||||
usbredir_reject_device(dev);
|
||||
return;
|
||||
}
|
||||
/* Fall through */
|
||||
case usb_redir_type_control:
|
||||
@ -1363,7 +1364,7 @@ static void usbredir_ep_info(void *priv,
|
||||
break;
|
||||
default:
|
||||
ERROR("Received invalid endpoint type\n");
|
||||
usbredir_device_disconnect(dev);
|
||||
usbredir_reject_device(dev);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user