From 1f0c8d0098447f942024f48e8ef8c07f14f08bc5 Mon Sep 17 00:00:00 2001 From: kamplom <476.1492.1789m@gmail.com> Date: Wed, 27 Mar 2024 01:37:57 +0100 Subject: [PATCH] on_message_received called with data_lenght instead of topic_length --- main/mqtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/mqtt.c b/main/mqtt.c index a27111c..280d6cc 100644 --- a/main/mqtt.c +++ b/main/mqtt.c @@ -83,7 +83,7 @@ static void event_handler_callback (void *arg, esp_event_base_t event_base, int3 /* if(arg != NULL) ((on_mqtt_message_received_ptr)arg)(mqtt_message.topic, (void *)mqtt_message.payload, mqtt_message.payload_length); else*/ if(mqtt_events.on_message_received) - mqtt_events.on_message_received(event->topic, (void *)event->data, (size_t)event->topic_len); + mqtt_events.on_message_received(event->topic, (void *)event->data, (size_t)event->data_len); break; default: