mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
host: Ignore some more libusb error return codes
It seems that sometimes we get even an LIBUSB_ERROR_IO and failing on errors breaks the application, while ignoring it works. Not sure why that really is, but for now it increases reliability.
This commit is contained in:
@@ -540,7 +540,9 @@ static void run_mainloop(struct cardem_inst *ci)
|
|||||||
if (transp->udp_fd < 0) {
|
if (transp->udp_fd < 0) {
|
||||||
rc = libusb_bulk_transfer(transp->usb_devh, transp->usb_ep.in,
|
rc = libusb_bulk_transfer(transp->usb_devh, transp->usb_ep.in,
|
||||||
buf, sizeof(buf), &xfer_len, 100000);
|
buf, sizeof(buf), &xfer_len, 100000);
|
||||||
if (rc < 0 && rc != LIBUSB_ERROR_TIMEOUT) {
|
if (rc < 0 && rc != LIBUSB_ERROR_TIMEOUT &&
|
||||||
|
rc != LIBUSB_ERROR_INTERRUPTED &&
|
||||||
|
rc != LIBUSB_ERROR_IO) {
|
||||||
fprintf(stderr, "BULK IN transfer error; rc=%d\n", rc);
|
fprintf(stderr, "BULK IN transfer error; rc=%d\n", rc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user