Call published event after subscribe, resolved #12

develop
Tuan PM 2015-01-04 16:47:38 +07:00
rodzic f837152bde
commit 34a3ea49b5
2 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -111,8 +111,11 @@ void MQTT_Publish( MQTT_Client *client,
```
**Default configuration**
See: *include/user_config.h* and *include/config.c*
If you want to load new default configurations, just change the value of CFG_HOLDER in ***include/user_config.h***
Now in the Makefile, it will erase section hold the user configuration at 0x3C000
```bash

Wyświetl plik

@ -168,8 +168,7 @@ mqtt_tcpclient_recv(void *arg, char *pdata, unsigned short len)
} else {
INFO("MQTT: Connected to %s:%d\r\n", client->host, client->port);
if(client->connectedCb)
client->connectedCb((uint32_t*)client);
client->connState = MQTT_SUBSCIBE_SEND;
}
break;
@ -185,6 +184,8 @@ mqtt_tcpclient_recv(void *arg, char *pdata, unsigned short len)
} else {
if(QUEUE_IsEmpty(&client->topicQueue)){
client->connState = MQTT_DATA;
if(client->connectedCb)
client->connectedCb((uint32_t*)client);
} else {
client->connState = MQTT_SUBSCIBE_SEND;
}