X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=blobdiff_plain;f=session.c;h=07144aa4ee70fb02eeefe68de64d140095382c38;hp=7d927b26423f436453ef80c2cdf19b4232370b44;hb=0894b97269117fef77fb22d06d726a38e652cee4;hpb=9db40e9fa0ce27cb7cf0982363915ed13d117138 diff --git a/session.c b/session.c index 7d927b2..07144aa 100644 --- a/session.c +++ b/session.c @@ -28,16 +28,6 @@ static int default_output_format = FALSE; static uint64_t limit_samples = 0; static uint64_t limit_frames = 0; -extern gchar *opt_output_file; -extern gchar *opt_output_format; -extern gchar *opt_pds; -extern gboolean opt_wait_trigger; -extern gchar *opt_time; -extern gchar *opt_samples; -extern gchar *opt_frames; -extern gchar *opt_continuous; -extern gchar *opt_config; -extern gchar *opt_triggers; #ifdef HAVE_SRD extern struct srd_session *srd_sess; #endif @@ -457,8 +447,6 @@ void run_session(void) GVariant *gvar; struct sr_dev_inst *sdi; uint64_t min_samples, max_samples; - int max_channels, i; - char **triggerlist; devices = device_scan(); if (!devices) { @@ -500,18 +488,10 @@ void run_session(void) } if (opt_triggers) { - if (!(triggerlist = sr_parse_triggerstring(sdi, opt_triggers))) { + if (!parse_triggerstring(sdi, opt_triggers)) { sr_session_destroy(); return; } - max_channels = g_slist_length(sdi->channels); - for (i = 0; i < max_channels; i++) { - if (triggerlist[i]) { - sr_dev_trigger_set(sdi, i, triggerlist[i]); - g_free(triggerlist[i]); - } - } - g_free(triggerlist); } if (opt_continuous) {