mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-20 09:26:37 +00:00
improved debugging arrangements for packetradio.
This commit is contained in:
parent
b79e8261d5
commit
4d674d06b9
@ -217,7 +217,8 @@ overlay_interface_read_any(struct sched_ent *alarm){
|
||||
interface->name);
|
||||
|
||||
if (packetOkOverlay(interface, packet, plen, recvttl, &src_addr, addrlen)) {
|
||||
WHY("Malformed packet");
|
||||
WHYF("Malformed packet (length = %d)",plen);
|
||||
if (config.debug.slip) dump("the malformed packet",packet,plen);
|
||||
}
|
||||
}
|
||||
if (alarm->poll.revents & (POLLHUP | POLLERR)) {
|
||||
|
4
slip.c
4
slip.c
@ -251,11 +251,11 @@ int slip_decode(struct slip_decode_state *state)
|
||||
// Check that CRC matches
|
||||
unsigned long crc=Crc32_ComputeBuf( 0, state->dst, state->packet_length);
|
||||
if (crc!=state->crc) {
|
||||
if (config.debug.slip)
|
||||
if (config.debug.packetradio)
|
||||
DEBUGF("Rejected packet of %d bytes due to CRC mis-match (%08x vs %08x)",
|
||||
state->packet_length,crc,state->crc);
|
||||
} else {
|
||||
if (config.debug.slip)
|
||||
if (config.debug.packetradio)
|
||||
DEBUGF("Accepted packet of %d bytes (CRC ok)",state->packet_length);
|
||||
return state->packet_length;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user