libbladeRF: fix spurious timeout warnings in USB event loop

libusb_handle_events_timeout() legitimately returns LIBUSB_ERROR_TIMEOUT
when no events occur within the timeout period. This is expected behavior,
not an error condition worth warning about.

FreeBSD's libusb implementation correctly returns this value per the API
specification, causing spurious log warnings during normal streaming.
This commit is contained in:
Abdelkader Boudih 2026-01-12 10:44:47 +01:00
commit 58ee5e4de5

View file

@ -1393,7 +1393,8 @@ static int lusb_stream(void *driver, struct bladerf_stream *stream,
while (stream->state != STREAM_DONE) {
status = libusb_handle_events_timeout(lusb->context, &tv);
if (status < 0 && status != LIBUSB_ERROR_INTERRUPTED) {
if (status < 0 && status != LIBUSB_ERROR_INTERRUPTED &&
status != LIBUSB_ERROR_TIMEOUT) {
log_warning("unexpected value from events processing: "
"%d: %s\n", status, libusb_error_name(status));
status = error_conv(status);