projects
/
profile
/
ivi
/
can-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f135ce3
)
fflush the new configurable stdout output to allow proper pipe/netcat setups.
author
Oliver Hartkopp
<socketcan@hartkopp.net>
Wed, 25 Nov 2009 18:51:31 +0000
(18:51 +0000)
committer
Oliver Hartkopp
<socketcan@hartkopp.net>
Wed, 25 Nov 2009 18:51:31 +0000
(18:51 +0000)
canplayer.c
patch
|
blob
|
history
diff --git
a/canplayer.c
b/canplayer.c
index
efce089
..
9494a6d
100644
(file)
--- a/
canplayer.c
+++ b/
canplayer.c
@@
-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)) {
fprintf(stderr, "wrong CAN frame format: '%s'!", ascframe);
if (parse_canframe(ascframe, &frame)) {
fprintf(stderr, "wrong CAN frame format: '%s'!", ascframe);