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>
This commit is contained in:
Lars-Peter Clausen 2012-07-05 21:15:08 +02:00 committed by Bert Vermeulen
parent ed229aaa8f
commit 9213ad012a
1 changed files with 0 additions and 2 deletions

View File

@ -366,8 +366,6 @@ SR_API int sr_session_stop(void)
if (dev->driver) {
if (dev->driver->dev_acquisition_stop)
dev->driver->dev_acquisition_stop(dev->driver_index, dev);
if (dev->driver->cleanup)
dev->driver->cleanup();
}
}