From 6852c0cb033fdd5498130afb3516507c3ca10d44 Mon Sep 17 00:00:00 2001 From: David Kopf Date: Thu, 25 Aug 2011 14:39:56 -0400 Subject: [PATCH] Trap CR in framed debug string --- tools/stm32w/wpcapslip6/wpcapslip6.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/stm32w/wpcapslip6/wpcapslip6.c b/tools/stm32w/wpcapslip6/wpcapslip6.c index 7f1d6cbcd..5d4f5d3cf 100755 --- a/tools/stm32w/wpcapslip6/wpcapslip6.c +++ b/tools/stm32w/wpcapslip6/wpcapslip6.c @@ -536,8 +536,15 @@ read_more: if (timestamp) { if (inpktbuf[0]!='0' || inpktbuf[1]!=0 || inpktbuf[2]!=0 || inpktbuf[3]!=0) stamptime(); } - fwrite(inpktbuf, inbufptr, 1, stderr); - inbufptr=0; +/* This could be a proper debug string starting with CR just a print to stdout */ +/* Trap the CR which would cause overwriting of the timestamp */ +//{int i;for (i=0;i