Commit 75a3eb2
committed
usb_libusb10.c: Keep track of dead transfers more correctly.
We failed to catch if the resubmission of a transfer failed in the transfer's
isochronous callback. This is bad because this is a very likely failure mode
if we accidentally unplug the Kinect - the last set of transfers complete
successfully, but the device is no longer there when we resubmit them.
It's okay for us to not know which particular transfers are dead, since
libusb_cancel_transfer() will handle transfers that don't exist by returning
LIBUSB_ERROR_NOT_FOUND if the transfer isn't pending.
This is related to #229, but I'm not sure if this is sufficient to fix it.
libusb on OSX doesn't always return what I expect it to.
Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>1 parent a283a06 commit 75a3eb2
1 file changed
+19
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
| 424 | + | |
424 | 425 | | |
425 | 426 | | |
426 | | - | |
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
440 | | - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
441 | 449 | | |
442 | 450 | | |
443 | 451 | | |
444 | 452 | | |
445 | 453 | | |
446 | 454 | | |
447 | 455 | | |
448 | | - | |
449 | 456 | | |
450 | 457 | | |
451 | 458 | | |
452 | 459 | | |
453 | 460 | | |
454 | 461 | | |
455 | 462 | | |
456 | | - | |
457 | 463 | | |
458 | 464 | | |
459 | 465 | | |
| |||
464 | 470 | | |
465 | 471 | | |
466 | 472 | | |
467 | | - | |
468 | 473 | | |
469 | | - | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
470 | 483 | | |
471 | 484 | | |
472 | 485 | | |
| |||
0 commit comments