aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-05-11 01:13:58 +0200
committerHarald Welte <laforge@gnumonks.org>2017-05-11 01:13:58 +0200
commit37ad41e09298c0afba5bfa84cba6fc91624fa8e9 (patch)
treeabc6aacae4c86a266f668da57207b68309854d7f /host
parent66de830f5587831a8dfd7ef4afe339471e45801a (diff)
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.
Diffstat (limited to 'host')
-rw-r--r--host/simtrace2-remsim.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/host/simtrace2-remsim.c b/host/simtrace2-remsim.c
index 8ac5a69..67cf8b8 100644
--- a/host/simtrace2-remsim.c
+++ b/host/simtrace2-remsim.c
@@ -540,7 +540,9 @@ static void run_mainloop(struct cardem_inst *ci)
if (transp->udp_fd < 0) {
rc = libusb_bulk_transfer(transp->usb_devh, transp->usb_ep.in,
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);
return;
}