The old fusb_libusb1 _reap() call always returned true except on
error. With this commit it checks that a transfer is actually
reaped and returns false otherwise.
int ret;
struct timeval tv;
+ // Save pending size
+ int pnd_size = d_pending_rqsts.size();
+
if (ok_to_block_p) {
tv.tv_sec = 2;
tv.tv_usec = 0;
return false;
}
- return true;
+ // Check that a pending transfer was removed
+ if (pnd_size > d_pending_rqsts.size())
+ return true;
+ else {
+ return false;
+ }
}
void