From 6e7e8e3d39270b7405ac38670514abd8a7eb650f Mon Sep 17 00:00:00 2001 From: Supowang <54426333+Supowang1989@users.noreply.github.com> Date: Mon, 18 Jan 2021 10:39:41 +0800 Subject: [PATCH] Update mqtt_iot_explorer_tc_demo.c --- devices/l610_tencent_firmware/mqtt_iot_explorer_tc_demo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/devices/l610_tencent_firmware/mqtt_iot_explorer_tc_demo.c b/devices/l610_tencent_firmware/mqtt_iot_explorer_tc_demo.c index 5001a8b2..9d98bf67 100644 --- a/devices/l610_tencent_firmware/mqtt_iot_explorer_tc_demo.c +++ b/devices/l610_tencent_firmware/mqtt_iot_explorer_tc_demo.c @@ -66,7 +66,7 @@ void mqtt_demo_task(void) printf("MQTT: %s\n", state == MQTT_STATE_CONNECTED ? "CONNECTED" : "DISCONNECTED"); } - /* ¿ªÊ¼¶©ÔÄtopic */ + size = snprintf(report_reply_topic_name, TOPIC_NAME_MAX_SIZE, "$thing/down/property/%s/%s", product_id, device_name); if (size < 0 || size > sizeof(report_reply_topic_name) - 1) { @@ -87,8 +87,7 @@ void mqtt_demo_task(void) while (1) { - - /* Éϱ¨Öµ */ + memset(payload, 0, sizeof(payload)); snprintf(payload, sizeof(payload), REPORT_DATA_TEMPLATE, 30);