Add error handling for mqtt, fixed some issues

This commit is contained in:
Tuan PM committed 2018-05-03 21:50:24 +07:00
1 parent 4bc37bb8db
commit 75d3c65cb6
13 files changed
+414 -234

No files matched your search

+7 -7
View File
@@ -54,14 +54,14 @@ typedef esp_err_t (* mqtt_event_callback_t)(esp_mqtt_event_handle_t event);
typedef struct {
mqtt_event_callback_t event_handle;
char host[MQTT_MAX_HOST_LEN];
char uri[MQTT_MAX_HOST_LEN];
const char *host;
const char *uri;
uint32_t port;
char client_id[MQTT_MAX_CLIENT_LEN];
char username[MQTT_MAX_USERNAME_LEN];
char password[MQTT_MAX_PASSWORD_LEN];
char lwt_topic[MQTT_MAX_LWT_TOPIC];
char lwt_msg[MQTT_MAX_LWT_MSG];
const char *client_id;
const char *username;
const char *password;
const char *lwt_topic;
const char *lwt_msg;
int lwt_qos;
int lwt_retain;
int lwt_msg_len;
+2 -2
View File
@@ -60,8 +60,8 @@
#endif
#define MQTT_ENABLE_SSL CONFIG_MQTT_TRANSPORT_SSL
#define MQTT_ENABLE_WS CONFIG_MQTT_TRANSPORT_WS
#define MQTT_ENABLE_WSS CONFIG_MQTT_TRANSPORT_WSS
#define MQTT_ENABLE_WS CONFIG_MQTT_TRANSPORT_WEBSOCKET
#define MQTT_ENABLE_WSS CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE
#define OUTBOX_EXPIRED_TIMEOUT_MS (30*1000)
#define OUTBOX_MAX_SIZE (4*1024)