|
|
@ -87,10 +87,13 @@ mqtt_client_init() |
|
|
|
flashConfig.mqtt_keepalive); |
|
|
|
flashConfig.mqtt_keepalive); |
|
|
|
|
|
|
|
|
|
|
|
if (flashConfig.mqtt_status_enable) { |
|
|
|
if (flashConfig.mqtt_status_enable) { |
|
|
|
statusTopicStr = (char*)os_zalloc(strlen(flashConfig.mqtt_clientid) + strlen(flashConfig.mqtt_status_topic) + 2); |
|
|
|
// removed client_id concat for now until a better solution is devised
|
|
|
|
os_strcpy(statusTopicStr, flashConfig.mqtt_clientid); |
|
|
|
// statusTopicStr = (char*)os_zalloc(strlen(flashConfig.mqtt_clientid) + strlen(flashConfig.mqtt_status_topic) + 2);
|
|
|
|
os_strcat(statusTopicStr, "/"); |
|
|
|
// os_strcpy(statusTopicStr, flashConfig.mqtt_clientid);
|
|
|
|
os_strcat(statusTopicStr, flashConfig.mqtt_status_topic); |
|
|
|
// os_strcat(statusTopicStr, "/");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
statusTopicStr = (char*)os_zalloc(strlen(flashConfig.mqtt_status_topic) + 1); |
|
|
|
|
|
|
|
os_strcpy(statusTopicStr, flashConfig.mqtt_status_topic); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
char* onlineMsg = " is online"; |
|
|
|
char* onlineMsg = " is online"; |
|
|
|