From 74f7b7b622a6d9eab94100a855b7f6de315346dd Mon Sep 17 00:00:00 2001 From: geeksville Date: Sun, 15 Mar 2020 16:27:15 -0700 Subject: [PATCH] print extra info the next time this error occurs --- src/MeshService.cpp | 3 +++ src/mesh-pb-constants.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/MeshService.cpp b/src/MeshService.cpp index a09b80186..e874685bb 100644 --- a/src/MeshService.cpp +++ b/src/MeshService.cpp @@ -255,6 +255,9 @@ void MeshService::handleToRadio(std::string s) break; } } + else { + DEBUG_MSG("Error: ignoring malformed toradio\n"); + } } void MeshService::sendToMesh(MeshPacket *p) diff --git a/src/mesh-pb-constants.cpp b/src/mesh-pb-constants.cpp index 45a203b60..0b4f4647d 100644 --- a/src/mesh-pb-constants.cpp +++ b/src/mesh-pb-constants.cpp @@ -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); 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; } else