demo: remove sources from session when done

This commit is contained in:
Bert Vermeulen 2012-08-03 10:09:02 +02:00
parent a3508e33f9
commit 7fd3e85961
1 changed files with 6 additions and 1 deletions

View 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;
}