Code cleanup

This commit is contained in:
fvanroie 2020-05-28 14:53:04 +02:00
parent 1e66d85f36
commit efe8efa2b0

View File

@ -239,8 +239,8 @@ void mqtt_send_statusupdate()
// Receive incoming messages
static void mqtt_message_cb(char * topic_p, byte * payload, unsigned int length)
{ // Handle incoming commands from MQTT
if(length >= MQTT_MAX_PACKET_SIZE) return;
payload[length] = '\0';
if(length >= MQTT_MAX_PACKET_SIZE) return; // Check if payload fits the buffer
payload[length] = '\0'; // There's room in the buffer
// String strTopic((char *)0);
// strTopic.reserve(MQTT_MAX_PACKET_SIZE);