From 644bb1e88009546aadd919695d3dd602f06441d7 Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Sat, 27 Apr 2013 17:34:00 +0200 Subject: [PATCH] Use new output API receive() function --- sigrok-cli.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sigrok-cli.c b/sigrok-cli.c index ade15cd..a1ab736 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -872,15 +872,15 @@ static void datafeed_in(const struct sr_dev_inst *sdi, break; } - if (o && o->format->recv) { - out = o->format->recv(o, sdi, packet); - if (out && out->len) { + if (o && o->format->receive) { + if (o->format->receive(o, sdi, packet, &out) == SR_OK && out) { fwrite(out->str, 1, out->len, outfile); fflush(outfile); + g_string_free(out, TRUE); } } - /* SR_DF_END needs to be handled after the output module's recv() + /* SR_DF_END needs to be handled after the output module's receive() * is called, so it can properly clean up that module etc. */ if (packet->type == SR_DF_END) { g_debug("cli: Received SR_DF_END"); -- 2.30.2