From: Bert Vermeulen Date: Fri, 3 Aug 2012 08:09:02 +0000 (+0200) Subject: demo: remove sources from session when done X-Git-Tag: dsupstream~736 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7fd3e8596192316cacd0d22d52f287df2c12d437;p=libsigrok.git demo: remove sources from session when done --- 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; }