From 420b406411e3178e3ed090880681885d1deab01a Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Sat, 18 Jul 2020 16:26:41 -0400 Subject: [PATCH] Use fflush() for each frame in examples/ax25dump.c --- examples/ax25dump.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/ax25dump.c b/examples/ax25dump.c index 55fd328..496692b 100644 --- a/examples/ax25dump.c +++ b/examples/ax25dump.c @@ -119,7 +119,7 @@ int main(int argc, char **argv) { fprintf(stderr, "%s: %s: %s\n", argv[0], "patty_print_frame_header()", strerror(errno)); - goto error_print; + goto error_io; } if (frame.type == PATTY_AX25_FRAME_XID) { @@ -136,12 +136,16 @@ int main(int argc, char **argv) { } if (patty_print_params(stdout, ¶ms) < 0) { - goto error_print; + goto error_io; } } if (patty_print_hexdump(stdout, buf, readlen) < 0) { - goto error_print; + goto error_io; + } + + if (fflush(stdout) < 0) { + goto error_io; } } @@ -153,7 +157,7 @@ int main(int argc, char **argv) { return 0; -error_print: +error_io: error_ax25_frame_decode_xid: error_ax25_frame_decode_control: error_ax25_frame_decode_address: