libhackrf: Fix early exit of transfer thread in case of syscal interruption

libusb can return LIBUSB_ERROR_INTERRUPTED and it's not really an error,
just a sign some syscall got interrupted by something. Don't abort on
that.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut
2013-06-06 22:55:06 +02:00
parent 02509f2f44
commit fce132d266

View File

@ -894,7 +894,7 @@ static void* transfer_threadproc(void* arg)
while( (device->streaming) && (do_exit == false) ) while( (device->streaming) && (do_exit == false) )
{ {
error = libusb_handle_events_timeout(g_libusb_context, &timeout); error = libusb_handle_events_timeout(g_libusb_context, &timeout);
if( error != 0 ) if( (error != 0) && (error != LIBUSB_ERROR_INTERRUPTED) )
{ {
device->streaming = false; device->streaming = false;
} }