]> sigrok.org Git - libsigrok.git/commitdiff
demo: remove sources from session when done
authorBert Vermeulen <redacted>
Fri, 3 Aug 2012 08:09:02 +0000 (10:09 +0200)
committerBert Vermeulen <redacted>
Fri, 3 Aug 2012 09:29:01 +0000 (11:29 +0200)
hardware/demo/demo.c

index dfc944131bbbbae87005f7ca88946e91395a09bc..02d89c724539fbc7ede3b418b6a3efc4e5effa3d 100644 (file)
@@ -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;
 }