Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: iio_writedev: don't close the buffer on path with EXIT_SUCCESS
The quit_all() routine has a nasty side-effect, in that it closes the buffer regardless of whether the exit-code is succesfull or not. This is bad as it can close a socket before the iio_buffer_push() is called resulting in an -EBADF error code. Also, we don't want to set 'app_running' to false for the cyclic context. This change makes quit_all() close the buffer only on calls with a signal different from EXIT_SUCCESS. Signed-off-by: Cristi Iacob <[email protected]>
- Loading branch information