Additional comments for reaping transactions
authorttsou <ttsou@vt.edu>
Tue, 25 Aug 2009 23:30:39 +0000 (19:30 -0400)
committerttsou <ttsou@vt.edu>
Tue, 15 Sep 2009 22:06:27 +0000 (18:06 -0400)
usrp/host/lib/fusb_libusb1.cc

index 6f1fc913f5816fd7a59c78872d662f9162900726..dc51d5709228c10f55741f512cae722950a4c215 100644 (file)
@@ -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;
   }