The cancel() call is needed in order to cancel the current transfers from each connected device before turning them off, when running in a continuous fashion. This prevents libsmu from getting into a deadlock because of the m_state mutex locked in the run() method.
The m_cancellation flag must be removed from the if-statement because it is only set in the device->cancel() method, preventing the program from entering this if statement.
This bug was introduced in 0548b85. The introduced bug has hidden by Pixelpulse, which I have used to test that modification. In Pixelpulse, session->close() was called before session->end(), solving the above mentioned threading issue.
The cancel() call is needed in order to cancel the current transfers from each connected device before turning them off, when running in a continuous fashion. This prevents libsmu from getting into a deadlock because of the m_state mutex locked in the run() method. The m_cancellation flag must be removed from the if-statement because it is only set in the device->cancel() method, preventing the program from entering this if statement.
This bug was introduced in 0548b85. The introduced bug has hidden by Pixelpulse, which I have used to test that modification. In Pixelpulse, session->close() was called before session->end(), solving the above mentioned threading issue.
Signed-off-by: Cristi Iacob cristian.iacob@analog.com