From: Martin Ling Date: Wed, 25 Mar 2015 01:54:52 +0000 (+0000) Subject: sigrok-cli: Update for sr_session_{new,load} API change. X-Git-Tag: sigrok-cli-0.6.0~36 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3d24ca2da53f03585db396e67252a7dcd9e67e6e;p=sigrok-cli.git sigrok-cli: Update for sr_session_{new,load} API change. --- diff --git a/input.c b/input.c index 9d7bf62..a0b054a 100644 --- a/input.c +++ b/input.c @@ -107,7 +107,7 @@ static void load_input_file_module(void) if (!in) g_critical("Error: no input module found for this file."); } - sr_session_new(&session); + sr_session_new(sr_ctx, &session); sr_session_datafeed_callback_add(session, &datafeed_in, NULL); got_sdi = FALSE; @@ -155,7 +155,8 @@ void load_input_file(void) /* Input from stdin is never a session file. */ load_input_file_module(); } else { - if ((ret = sr_session_load(opt_input_file, &session)) == SR_OK) { + if ((ret = sr_session_load(sr_ctx, opt_input_file, + &session)) == SR_OK) { /* sigrok session file */ ret = sr_session_dev_list(session, &devices); if (ret != SR_OK || !devices || !devices->data) { diff --git a/session.c b/session.c index aa30266..983d484 100644 --- a/session.c +++ b/session.c @@ -553,7 +553,7 @@ void run_session(void) g_slist_free(devices); g_slist_free(real_devices); - sr_session_new(&session); + sr_session_new(sr_ctx, &session); sr_session_datafeed_callback_add(session, datafeed_in, NULL); if (sr_dev_open(sdi) != SR_OK) { diff --git a/sigrok-cli.h b/sigrok-cli.h index d7b9d9c..ac86669 100644 --- a/sigrok-cli.h +++ b/sigrok-cli.h @@ -31,6 +31,7 @@ #define SAVE_CHUNK_SIZE (512 * 1024) /* main.c */ +struct sr_context *sr_ctx; int select_channels(struct sr_dev_inst *sdi); gboolean config_key_has_cap(struct sr_dev_driver *driver, const struct sr_dev_inst *sdi, struct sr_channel_group *cg,