mirror of
https://github.com/espressif/esp-mqtt.git
synced 2025-07-30 18:58:07 +02:00
Client: Fix C++ build failing on incorrect event enum conversion
Closes https://github.com/espressif/esp-idf/issues/4787
This commit is contained in:
@ -37,6 +37,7 @@ typedef struct esp_mqtt_client *esp_mqtt_client_handle_t;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
MQTT_EVENT_ANY = -1,
|
||||||
MQTT_EVENT_ERROR = 0, /*!< on error event, additional context: connection return code, error handle from esp_tls (if supported) */
|
MQTT_EVENT_ERROR = 0, /*!< on error event, additional context: connection return code, error handle from esp_tls (if supported) */
|
||||||
MQTT_EVENT_CONNECTED, /*!< connected event, additional context: session_present flag */
|
MQTT_EVENT_CONNECTED, /*!< connected event, additional context: session_present flag */
|
||||||
MQTT_EVENT_DISCONNECTED, /*!< disconnected event */
|
MQTT_EVENT_DISCONNECTED, /*!< disconnected event */
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
#endif /* MQTT_USE_API_LOCKS */
|
#endif /* MQTT_USE_API_LOCKS */
|
||||||
|
|
||||||
_Static_assert(sizeof(uint64_t) == sizeof(outbox_tick_t), "mqtt-client tick type size different from outbox tick type");
|
_Static_assert(sizeof(uint64_t) == sizeof(outbox_tick_t), "mqtt-client tick type size different from outbox tick type");
|
||||||
|
#ifdef ESP_EVENT_ANY_ID
|
||||||
|
_Static_assert(MQTT_EVENT_ANY == ESP_EVENT_ANY_ID, "mqtt-client event enum does not match the global EVENT_ANY_ID");
|
||||||
|
#endif
|
||||||
|
|
||||||
static const char *TAG = "MQTT_CLIENT";
|
static const char *TAG = "MQTT_CLIENT";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user