summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorttsou2009-08-25 19:30:39 -0400
committerttsou2009-09-15 18:06:27 -0400
commit0d7fa4aac5b01cf463e1a065205094cd494853ee (patch)
tree6c86e070cccb34af1d8c11999dda775a49cd30ec
parent3d3888c40ac46cbbd8851e9bc5e83557e0415887 (diff)
downloadgnuradio-0d7fa4aac5b01cf463e1a065205094cd494853ee.tar.gz
gnuradio-0d7fa4aac5b01cf463e1a065205094cd494853ee.tar.bz2
gnuradio-0d7fa4aac5b01cf463e1a065205094cd494853ee.zip
Additional comments for reaping transactions
-rw-r--r--usrp/host/lib/fusb_libusb1.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/usrp/host/lib/fusb_libusb1.cc b/usrp/host/lib/fusb_libusb1.cc
index 6f1fc913f..dc51d5709 100644
--- a/usrp/host/lib/fusb_libusb1.cc
+++ b/usrp/host/lib/fusb_libusb1.cc
@@ -261,7 +261,13 @@ fusb_devhandle_libusb1::_cancel_lut (libusb_transfer *lut)
/*
* Reimplementing _reap for context use and compatibiliy with libusb-0.12.
- * Returns false on error, true otherwise.
+ *
+ * Returns false on timeout or error, true if an event was handled
+ *
+ * If ok_to_block_p is false then handle already pending events and return
+ * immediately.
+ * If ok_to_block_p is true then call libusb_handle_events_timeout with default
+ * timeout value of 2 seconds, which returns on event arrival or timeout.
*/
bool
@@ -279,8 +285,9 @@ fusb_devhandle_libusb1::_reap (bool ok_to_block_p)
tv.tv_usec = 0;
}
+
if ((ret = libusb_handle_events_timeout(d_ctx, &tv)) < 0) {
- fprintf (stderr, "fusb::_reap libusb_handle_events()\n");
+ fprintf (stderr, "fusb::_reap libusb_handle_events() %i\n", ret);
return false;
}