mirror of
https://github.com/espressif/esp-mqtt.git
synced 2025-11-07 02:22:23 +01:00
ADD: Get the response code from a failing connection.
This commit adds an event information "connect_return_code" that is written when the client state is MQTT_STATE_INIT, and the connection fails. This event info can then be written by the user app to find out the reason of the fail connection. Merges https://github.com/espressif/esp-mqtt/pull/100
This commit is contained in:
committed by
David Cermak
parent
430676cadb
commit
67042a1315
@@ -57,15 +57,6 @@ enum mqtt_message_type {
|
||||
MQTT_MSG_TYPE_DISCONNECT = 14
|
||||
};
|
||||
|
||||
enum mqtt_connect_return_code {
|
||||
CONNECTION_ACCEPTED = 0,
|
||||
CONNECTION_REFUSE_PROTOCOL,
|
||||
CONNECTION_REFUSE_ID_REJECTED,
|
||||
CONNECTION_REFUSE_SERVER_UNAVAILABLE,
|
||||
CONNECTION_REFUSE_BAD_USERNAME,
|
||||
CONNECTION_REFUSE_NOT_AUTHORIZED
|
||||
};
|
||||
|
||||
typedef struct mqtt_message {
|
||||
uint8_t *data;
|
||||
uint32_t length;
|
||||
|
||||
Reference in New Issue
Block a user