mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
fflush the new configurable stdout output to allow proper pipe/netcat setups.
This commit is contained in:
+3
-2
@@ -423,11 +423,12 @@ int main(int argc, char **argv)
|
|||||||
txidx = get_txidx(device);
|
txidx = get_txidx(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (txidx == STDOUTIDX) /* hook to print logfile lines on stdout */
|
if (txidx == STDOUTIDX) { /* hook to print logfile lines on stdout */
|
||||||
|
|
||||||
printf("%s", buf); /* print the line AS-IS without extra \n */
|
printf("%s", buf); /* print the line AS-IS without extra \n */
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
else if (txidx > 0) { /* only send to valid CAN devices */
|
} else if (txidx > 0) { /* only send to valid CAN devices */
|
||||||
|
|
||||||
if (parse_canframe(ascframe, &frame)) {
|
if (parse_canframe(ascframe, &frame)) {
|
||||||
fprintf(stderr, "wrong CAN frame format: '%s'!", ascframe);
|
fprintf(stderr, "wrong CAN frame format: '%s'!", ascframe);
|
||||||
|
|||||||
Reference in New Issue
Block a user