diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-02-10 17:04:52 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2012-02-10 17:04:52 +0100 |
commit | 5dd5ac31646dd144ea63ce5c7a6dac75d4096c51 (patch) | |
tree | 1611f7c55e23eee87e0bb6087bb025b83d366901 /usbredirhost | |
parent | 70b628d931234277f63d29a056ffc17d0efdd5bf (diff) |
usbredirhost: Fix tracking of input interrupt urb status
When an input interrupt urb failed with an error of LIBUSB_TRANSFER_NO_DEVICE,
we do not resubmit it (which is correct), but we did not set endpoint.interrupt
in_transfer to NULL either, so later on we would try to cancel the non
submitted urb.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'usbredirhost')
-rw-r--r-- | usbredirhost/usbredirhost.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/usbredirhost/usbredirhost.c b/usbredirhost/usbredirhost.c index 8862019..2018c42 100644 --- a/usbredirhost/usbredirhost.c +++ b/usbredirhost/usbredirhost.c @@ -1168,9 +1168,6 @@ static void usbredirhost_interrupt_packet_complete( switch (r) { case LIBUSB_TRANSFER_COMPLETED: break; - case LIBUSB_TRANSFER_CANCELLED: - /* intentionally stopped */ - goto unlock; case LIBUSB_TRANSFER_STALL: WARNING("interrupt endpoint %02X stalled, clearing stall", ep); r = libusb_clear_halt(host->handle, ep); @@ -1186,10 +1183,9 @@ static void usbredirhost_interrupt_packet_complete( goto resubmit; case LIBUSB_TRANSFER_NO_DEVICE: usbredirhost_handle_disconnect(host); + usbredirhost_free_transfer(transfer); + host->endpoint[EP2I(ep)].interrupt_in_transfer = NULL; goto unlock; - case LIBUSB_TRANSFER_OVERFLOW: - case LIBUSB_TRANSFER_ERROR: - case LIBUSB_TRANSFER_TIMED_OUT: default: ERROR("interrupt in error on endpoint %02X: %d", ep, r); len = 0; |