mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 05:36:37 +00:00
Use the zero terminated copy as payload
This commit is contained in:
parent
82061a9ecd
commit
157c5e9449
@ -186,7 +186,7 @@ int msgarrvd(void* context, char* topicName, int topicLen, MQTTClient_message* m
|
||||
memcpy(msg, (char*)message->payload, message->payloadlen);
|
||||
msg[message->payloadlen] = '\0';
|
||||
|
||||
mqtt_message_cb(topicName, (char*)message->payload, message->payloadlen);
|
||||
mqtt_message_cb(topicName, msg, message->payloadlen);
|
||||
|
||||
MQTTClient_freeMessage(&message);
|
||||
MQTTClient_free(topicName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user