switch (packet->type) {
case SR_DF_HEADER:
g_debug("cli: Received SR_DF_HEADER.");
- o = setup_output_format(sdi);
+ if (!(o = setup_output_format(sdi)))
+ g_critical("Failed to initialize output module.");
/* Set up backup analog output module. */
oa = sr_output_new(sr_output_find("analog"), NULL, sdi);
const struct sr_output_module *omod;
const struct sr_option *opt;
GSList *l;
- char *s;
+ char *s, **tok;
- if (!(omod = sr_output_find(opt_output_format)))
+ tok = g_strsplit(opt_output_format, ":", 0);
+ if (!tok[0] || !(omod = sr_output_find(tok[0])))
g_critical("Output module '%s' not found.", opt_output_format);
printf("ID: %s\nName: %s\n", sr_output_id_get(omod),
}
sr_output_options_free(omod);
}
+ g_strfreev(tok);
}