diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-10-12 17:13:32 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2012-11-04 15:47:39 +0100 |
commit | 57a3ae050cc9430e6bd24fff2a316565b29cb777 (patch) | |
tree | d3ae6c0be1f11175e70c90ce2a2f2c975fa72cf8 | |
parent | ef5e6f036602e44f2624d8cd1c8c84a4845c13b6 (diff) |
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>
-rw-r--r-- | hw/usb/redirect.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 5296d3a83..0cc344386 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -1376,7 +1376,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: @@ -1386,7 +1387,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; } } |