X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=blobdiff_plain;f=sigrok-cli.c;h=bce88e4a9acbc12c2c10c957eb05f0eb4ab4212c;hp=ab8296e1317f413ae19c10ad9b9f6ea1ed90085b;hb=60ea8937c54f5a8a36b4e4f91de03ff545e2bcd9;hpb=5befb6d6d9bdd1e16eac6a77512e93bdb1997197 diff --git a/sigrok-cli.c b/sigrok-cli.c index ab8296e..bce88e4 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include "sigrok-cli.h" #include "config.h" @@ -583,6 +583,7 @@ static void datafeed_in(struct sr_dev *dev, struct sr_datafeed_packet *packet) o->format->data(o, filter_out, filter_out_len, &output_buf, &output_len); if (output_buf) { fwrite(output_buf, 1, output_len, outfile); + fflush(outfile); g_free(output_buf); } } @@ -638,6 +639,7 @@ static void datafeed_in(struct sr_dev *dev, struct sr_datafeed_packet *packet) &output_buf, &output_len); if (output_buf) { fwrite(output_buf, 1, output_len, outfile); + fflush(outfile); g_free(output_buf); } } @@ -652,6 +654,7 @@ static void datafeed_in(struct sr_dev *dev, struct sr_datafeed_packet *packet) &output_len); if (output_buf) { fwrite(output_buf, 1, output_len, outfile); + fflush(outfile); g_free(output_buf); } } @@ -664,6 +667,7 @@ static void datafeed_in(struct sr_dev *dev, struct sr_datafeed_packet *packet) &output_len); if (output_buf) { fwrite(output_buf, 1, output_len, outfile); + fflush(outfile); g_free(output_buf); } }