Merge pull request #223 from DavidLin1577/patch-13

Update esp8266_tencent_firmware.c
This commit is contained in:
Supowang 2020-08-11 18:58:09 +08:00 committed by GitHub
commit e32fb2f04e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -130,6 +130,10 @@ int esp8266_tencent_firmware_module_mqtt_state_get(mqtt_state_t *state)
}
str = strstr(echo.buffer, "+TCMQTTSTATE:");
if (!str)
{
return -1;
}
sscanf(str, "+TCMQTTSTATE:%d", &ret_state);
if (ret_state == 0) {
*state = MQTT_STATE_DISCONNECTED;