]> sigrok.org Git - sigrok-cli.git/commitdiff
Update for libsigrok datafeed callback API changes.
authorMartin Ling <redacted>
Mon, 15 Apr 2013 20:17:23 +0000 (21:17 +0100)
committerBert Vermeulen <redacted>
Tue, 16 Apr 2013 09:39:23 +0000 (11:39 +0200)
sigrok-cli.c

index a194a5cb9c3ec9c4a7a8c854b5c52331ef4dc8ac..9363b7a055aa5a1139cbae5462775377e9cc261c 100644 (file)
@@ -644,7 +644,7 @@ static GArray *get_enabled_logic_probes(const struct sr_dev_inst *sdi)
 }
 
 static void datafeed_in(const struct sr_dev_inst *sdi,
-               const struct sr_datafeed_packet *packet)
+               const struct sr_datafeed_packet *packet, void *cb_data)
 {
        const struct sr_datafeed_meta *meta;
        const struct sr_datafeed_logic *logic;
@@ -663,6 +663,8 @@ static void datafeed_in(const struct sr_dev_inst *sdi,
        uint64_t samplerate, output_len, filter_out_len;
        uint8_t *output_buf, *filter_out;
 
+       (void) cb_data;
+
        /* If the first packet to come in isn't a header, don't even try. */
        if (packet->type != SR_DF_HEADER && o == NULL)
                return;
@@ -1392,7 +1394,7 @@ static void load_input_file_format(void)
                return;
 
        sr_session_new();
-       sr_session_datafeed_callback_add(datafeed_in);
+       sr_session_datafeed_callback_add(datafeed_in, NULL);
        if (sr_session_dev_add(in->sdi) != SR_OK) {
                g_critical("Failed to use device.");
                sr_session_destroy();
@@ -1412,7 +1414,7 @@ static void load_input_file(void)
 
        if (sr_session_load(opt_input_file) == SR_OK) {
                /* sigrok session file */
-               sr_session_datafeed_callback_add(datafeed_in);
+               sr_session_datafeed_callback_add(datafeed_in, NULL);
                sr_session_start();
                sr_session_run();
                sr_session_stop();
@@ -1591,7 +1593,7 @@ static void run_session(void)
        sdi = devices->data;
 
        sr_session_new();
-       sr_session_datafeed_callback_add(datafeed_in);
+       sr_session_datafeed_callback_add(datafeed_in, NULL);
 
        if (sr_session_dev_add(sdi) != SR_OK) {
                g_critical("Failed to use device.");