Fixed bug in mqtt_iot_explorer_e53_light.c
This commit is contained in:
@@ -214,7 +214,7 @@ static void mqtt_demo_task(void)
|
||||
printf("module mqtt sub success\n");
|
||||
}
|
||||
|
||||
memset(report_topic_name, sizeof(report_topic_name), 0);
|
||||
memset(report_topic_name, 0, sizeof(report_topic_name));
|
||||
size = snprintf(report_topic_name, TOPIC_NAME_MAX_SIZE, "$thing/up/property/%s/%s", product_id, device_name);
|
||||
if (size < 0 || size > sizeof(report_topic_name) - 1) {
|
||||
printf("pub topic content length not enough! content size:%d buf size:%d", size, (int)sizeof(report_topic_name));
|
||||
|
Reference in New Issue
Block a user