Clear streaming flag if a transfer was cancelled.

If a transfer was cancelled, we are on our way to shutdown.

If hackrf_stop_tx() or hackrf_stop_rx() were called, they will already
have cleared this flag, but it is not cleared in hackrf_close(), and
for consistency with other paths it makes sense to clear it here.
This commit is contained in:
Martin Ling
2022-03-18 01:09:06 +00:00
parent 125bf9f7bb
commit 6bd9cb0553

View File

@ -1762,6 +1762,7 @@ static void LIBUSB_CALL hackrf_libusb_transfer_callback(struct libusb_transfer*
}
} else if(usb_transfer->status == LIBUSB_TRANSFER_CANCELLED) {
transfer_finished(device, usb_transfer);
device->streaming = false;
} else {
/* Other cases LIBUSB_TRANSFER_NO_DEVICE
LIBUSB_TRANSFER_ERROR, LIBUSB_TRANSFER_TIMED_OUT