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>
master
Hans de Goede 2012-10-31 13:47:14 +01:00 committed by Gerd Hoffmann
parent 7e03d17816
commit 24ac283aa2
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}
}