Use fflush() for each frame in examples/ax25dump.c
This commit is contained in:
parent
305653e19b
commit
420b406411
1 changed files with 8 additions and 4 deletions
|
@ -119,7 +119,7 @@ int main(int argc, char **argv) {
|
||||||
fprintf(stderr, "%s: %s: %s\n",
|
fprintf(stderr, "%s: %s: %s\n",
|
||||||
argv[0], "patty_print_frame_header()", strerror(errno));
|
argv[0], "patty_print_frame_header()", strerror(errno));
|
||||||
|
|
||||||
goto error_print;
|
goto error_io;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frame.type == PATTY_AX25_FRAME_XID) {
|
if (frame.type == PATTY_AX25_FRAME_XID) {
|
||||||
|
@ -136,12 +136,16 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (patty_print_params(stdout, ¶ms) < 0) {
|
if (patty_print_params(stdout, ¶ms) < 0) {
|
||||||
goto error_print;
|
goto error_io;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (patty_print_hexdump(stdout, buf, readlen) < 0) {
|
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;
|
return 0;
|
||||||
|
|
||||||
error_print:
|
error_io:
|
||||||
error_ax25_frame_decode_xid:
|
error_ax25_frame_decode_xid:
|
||||||
error_ax25_frame_decode_control:
|
error_ax25_frame_decode_control:
|
||||||
error_ax25_frame_decode_address:
|
error_ax25_frame_decode_address:
|
||||||
|
|
Loading…
Add table
Reference in a new issue