RPL Native Border Router: fix SLIP bug that may occur whenever there is more bytes left in tx buffer than what we just sent
This commit is contained in:
parent
07ddf50267
commit
92018b0df0
|
@ -336,7 +336,7 @@ slip_flushbuf(int fd)
|
||||||
if(slip_begin == slip_packet_end) {
|
if(slip_begin == slip_packet_end) {
|
||||||
slip_packet_count--;
|
slip_packet_count--;
|
||||||
if(slip_end > slip_packet_end) {
|
if(slip_end > slip_packet_end) {
|
||||||
memcpy(slip_buf, slip_buf + slip_packet_end,
|
memmove(slip_buf, slip_buf + slip_packet_end,
|
||||||
slip_end - slip_packet_end);
|
slip_end - slip_packet_end);
|
||||||
}
|
}
|
||||||
slip_end -= slip_packet_end;
|
slip_end -= slip_packet_end;
|
||||||
|
|
Loading…
Reference in New Issue