]> git.sesse.net Git - bmusb/commitdiff
If libusb_submit_transfer() fails, output the actual error number.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 31 Oct 2015 20:38:12 +0000 (21:38 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 31 Oct 2015 20:38:12 +0000 (21:38 +0100)
bmusb.cpp

index b3739caf28db7052ae9fe68024004d5ca526a299..c09c02dc2d19392e0e0927490d5aa215e73238d8 100644 (file)
--- a/bmusb.cpp
+++ b/bmusb.cpp
@@ -638,8 +638,9 @@ void BMUSBCapture::cb_xfr(struct libusb_transfer *xfr)
        }
 #endif
 
-       if (libusb_submit_transfer(xfr) < 0) {
-               fprintf(stderr, "error re-submitting URB\n");
+       int rc = libusb_submit_transfer(xfr);
+       if (rc < 0) {
+               fprintf(stderr, "error re-submitting URB: %s\n", libusb_error_name(rc));
                exit(1);
        }
 }