Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
utils: iio_rwdev: fix cancelling streaming
If we try to cancel the utility with a signal, we'll cancel the buffer (at least on linux) which means we'll likely fail to dequeue a block if we are waiting for one. On top of that the flag 'app_running' is set to false which means that the loop condition '(ret && app_running)' is false and so we do not leave it. This all means that we'll proceed with an invalid block leading to a segfault. Hence, always break the loop if iio_stream_get_next_block() fails (which was the previous behavior) but only log it if the application is running. Signed-off-by: Nuno Sá <[email protected]>
- Loading branch information