mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-02-24 19:29:13 +00:00
Revert "tunslip6: make printing of sensible strings from mote more reliable"
This reverts commit 6608b62b01953b8a263ffda65802c1bc9052c06c.
This commit is contained in:
parent
6b29e4b30d
commit
30f69b0852
@ -238,21 +238,13 @@ serial_to_tun(FILE *inslip, int outfd)
|
|||||||
slip_send(slipfd, SLIP_END);
|
slip_send(slipfd, SLIP_END);
|
||||||
}
|
}
|
||||||
#define DEBUG_LINE_MARKER '\r'
|
#define DEBUG_LINE_MARKER '\r'
|
||||||
if(uip.inbuf[0] == DEBUG_LINE_MARKER ||
|
} else if(uip.inbuf[0] == DEBUG_LINE_MARKER) {
|
||||||
is_sensible_string(uip.inbuf, inbufptr)) {
|
fwrite(uip.inbuf + 1, inbufptr - 1, 1, stdout);
|
||||||
unsigned char *out = uip.inbuf;
|
} else if(is_sensible_string(uip.inbuf, inbufptr)) {
|
||||||
unsigned int len = inbufptr;
|
if(verbose==1) { /* strings already echoed below for verbose>1 */
|
||||||
if(uip.inbuf[0] == DEBUG_LINE_MARKER) {
|
if (timestamp) stamptime();
|
||||||
out++;
|
fwrite(uip.inbuf, inbufptr, 1, stdout);
|
||||||
len--;
|
}
|
||||||
}
|
|
||||||
fprintf(stderr, "\n***");
|
|
||||||
fwrite(out, len, 1, stderr);
|
|
||||||
fprintf(stderr, "***\n");
|
|
||||||
} else {
|
|
||||||
fprintf(stderr,
|
|
||||||
"serial_to_tun: drop packet len=%d\n", inbufptr);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if(verbose>2) {
|
if(verbose>2) {
|
||||||
if (timestamp) stamptime();
|
if (timestamp) stamptime();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user