print extra info the next time this error occurs

This commit is contained in:
geeksville 2020-03-15 16:27:15 -07:00
parent 9ec8562ce7
commit 74f7b7b622
2 changed files with 4 additions and 1 deletions

View File

@ -255,6 +255,9 @@ void MeshService::handleToRadio(std::string s)
break; break;
} }
} }
else {
DEBUG_MSG("Error: ignoring malformed toradio\n");
}
} }
void MeshService::sendToMesh(MeshPacket *p) void MeshService::sendToMesh(MeshPacket *p)

View File

@ -30,7 +30,7 @@ bool pb_decode_from_bytes(const uint8_t *srcbuf, size_t srcbufsize, const pb_msg
pb_istream_t stream = pb_istream_from_buffer(srcbuf, srcbufsize); pb_istream_t stream = pb_istream_from_buffer(srcbuf, srcbufsize);
if (!pb_decode(&stream, fields, dest_struct)) if (!pb_decode(&stream, fields, dest_struct))
{ {
DEBUG_MSG("Error: can't decode protobuf %s\n", PB_GET_ERROR(&stream)); DEBUG_MSG("Error: can't decode protobuf %s, pb_msgdesc 0x%p\n", PB_GET_ERROR(&stream), fields);
return false; return false;
} }
else else