sforkowany z mirror/meshtastic-firmware
Update MQTT.cpp (#1534)
Fix returning pointer to local variable that will become invalid when returning. Co-authored-by: Ben Meadors <benmmeadors@gmail.com>raytac-diy
rodzic
c725a6b65f
commit
f26441727c
|
@ -356,8 +356,8 @@ String MQTT::downstreamPacketToJson(MeshPacket *mp)
|
|||
{"payload", msgPayload}};
|
||||
|
||||
// serialize and return it
|
||||
std::string jsonStr = jsonObj.dump();
|
||||
static std::string jsonStr = jsonObj.dump();
|
||||
DEBUG_MSG("serialized json message: %s\n", jsonStr.c_str());
|
||||
|
||||
return jsonStr.c_str();
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue