Closed johanhedin closed 3 years ago
This code shall be reviewed more carefully (and tested)
device->streaming = false
shall be replaced by device->stop_requested = true
for a clean stop to be confirmed/checked
- It seems in the code you have modified
device->streaming = false
shall be replaced bydevice->stop_requested = true
for a clean stop to be confirmed/checked
Replacing device->streaming = false
with device->stop_requested = true
in the three locations my patch touches seem to work as well. But, this will remove the way to detect that something has happened since airspy_is_streaming()
will now continue to return "streaming" even after the device is pulled...
And the streaming has stopped, so it feels logical that airspy_is_streaming()
should return false in this case. But this can of course be fixed by extending airspy_is_streaming()
to also check for device->stop_requested
and return false if it is set to true.
Created a new pull request according to your suggestion (#76). Works as intended om my test setup. I will remove the irrelevant pull requests when the dust settles.
This PR is cancelled in favor to https://github.com/airspy/airspyone_host/pull/76
Signal the same condition on USB error as on a successful transfer so that the consumer_threadproc can exit properly when a USB error occur (like a device disconnect).
Mitigates issue #74.