Fixed bug in l610_tencent_firmware
This commit is contained in:
@@ -66,7 +66,7 @@ void mqtt_demo_task(void)
|
|||||||
printf("MQTT: %s\n", state == MQTT_STATE_CONNECTED ? "CONNECTED" : "DISCONNECTED");
|
printf("MQTT: %s\n", state == MQTT_STATE_CONNECTED ? "CONNECTED" : "DISCONNECTED");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>topic */
|
/* ¿ªÊ¼¶©ÔÄtopic */
|
||||||
size = snprintf(report_reply_topic_name, TOPIC_NAME_MAX_SIZE, "$thing/down/property/%s/%s", product_id, device_name);
|
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) {
|
if (size < 0 || size > sizeof(report_reply_topic_name) - 1) {
|
||||||
@@ -78,7 +78,7 @@ void mqtt_demo_task(void)
|
|||||||
printf("module mqtt sub success\n");
|
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);
|
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) {
|
if (size < 0 || size > sizeof(report_topic_name) - 1) {
|
||||||
@@ -88,7 +88,7 @@ void mqtt_demo_task(void)
|
|||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
||||||
/* <EFBFBD>ϱ<EFBFBD>ֵ */
|
/* Éϱ¨Öµ */
|
||||||
memset(payload, 0, sizeof(payload));
|
memset(payload, 0, sizeof(payload));
|
||||||
snprintf(payload, sizeof(payload), REPORT_DATA_TEMPLATE, 30);
|
snprintf(payload, sizeof(payload), REPORT_DATA_TEMPLATE, 30);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user