fix bt reads of owner etc

This commit is contained in:
geeksville
2020-02-04 13:47:42 -08:00
parent b538677ad2
commit 37eca63e58
6 changed files with 11 additions and 13 deletions

View File

@@ -11,7 +11,7 @@ size_t pb_encode_to_bytes(uint8_t *destbuf, size_t destbufsize, const pb_msgdesc
{
pb_ostream_t stream = pb_ostream_from_buffer(destbuf, destbufsize);
if (!pb_encode(&stream, fields, &src_struct))
if (!pb_encode(&stream, fields, src_struct))
{
DEBUG_MSG("Error: can't encode protobuf %s\n", PB_GET_ERROR(&stream));
assert(0); // FIXME - panic
@@ -27,7 +27,7 @@ size_t pb_encode_to_bytes(uint8_t *destbuf, size_t destbufsize, const pb_msgdesc
bool pb_decode_from_bytes(const uint8_t *srcbuf, size_t srcbufsize, const pb_msgdesc_t *fields, void *dest_struct)
{
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));
return false;