From 7fd3e8596192316cacd0d22d52f287df2c12d437 Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Fri, 3 Aug 2012 10:09:02 +0200 Subject: [PATCH] demo: remove sources from session when done --- hardware/demo/demo.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index dfc94413..02d89c72 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -518,13 +518,18 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, static int hw_dev_acquisition_stop(const struct sr_dev_inst *sdi, void *cb_data) { + struct dev_context *devc; + /* Avoid compiler warnings. */ - (void)sdi; (void)cb_data; + devc = sdi->priv; + /* Stop generate thread. */ thread_running = 0; + sr_session_source_remove_channel(devc->channels[0]); + return SR_OK; }