Update esp8266_tencent_firmware.c
if (!str)
{
return -1;
}
This commit is contained in:
parent
ad5f75d4a3
commit
fbe69ca3f8
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue