sr: session: Do not cleanup the driver state in sr_session_stop()
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 5 Jul 2012 19:15:08 +0000 (21:15 +0200)
committerBert Vermeulen <bert@biot.com>
Wed, 11 Jul 2012 21:28:35 +0000 (23:28 +0200)
commitf82c76b83a69a6fc314bc39e6a6c60f072d7c766
tree0c833b955901d4d5cc9246428b23c5debcabb49d
parent6522415610a9f75b039de5e5c04264774541f080
sr: session: Do not cleanup the driver state in sr_session_stop()

By cleaning up the driver state all devices will become inaccessible, which
means that is neither possible to query any information from it (like sample
rate) and it is also not possible to restart data acquisition.

sr_session_save() tries to query the sample rate from the device, as a result
calling sr_session_save() after calling sr_session_stop() - which is for example
done by sigrok-cli - will cause a segfault. This patch resolves the issue.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
libsigrok/session.c