net: mqtt: Remove explicit numeration of transport enum
The transport number is used to pick elements of an array which is initialized using #if defined macros. Having explicit numeration in this enum leads to situations where the array index is different than the enum value. Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This commit is contained in:
parent
ead249f2f9
commit
0b5ed97785
1 changed files with 3 additions and 3 deletions
|
@ -341,17 +341,17 @@ struct mqtt_sec_config {
|
||||||
/** @brief MQTT transport type. */
|
/** @brief MQTT transport type. */
|
||||||
enum mqtt_transport_type {
|
enum mqtt_transport_type {
|
||||||
/** Use non secure TCP transport for MQTT connection. */
|
/** Use non secure TCP transport for MQTT connection. */
|
||||||
MQTT_TRANSPORT_NON_SECURE = 0x00,
|
MQTT_TRANSPORT_NON_SECURE,
|
||||||
|
|
||||||
#if defined(CONFIG_MQTT_LIB_TLS)
|
#if defined(CONFIG_MQTT_LIB_TLS)
|
||||||
/** Use secure TCP transport (TLS) for MQTT connection. */
|
/** Use secure TCP transport (TLS) for MQTT connection. */
|
||||||
MQTT_TRANSPORT_SECURE = 0x01,
|
MQTT_TRANSPORT_SECURE,
|
||||||
#endif /* CONFIG_MQTT_LIB_TLS */
|
#endif /* CONFIG_MQTT_LIB_TLS */
|
||||||
|
|
||||||
/** Shall not be used as a transport type.
|
/** Shall not be used as a transport type.
|
||||||
* Indicator of maximum transport types possible.
|
* Indicator of maximum transport types possible.
|
||||||
*/
|
*/
|
||||||
MQTT_TRANSPORT_NUM = 0x02
|
MQTT_TRANSPORT_NUM
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief MQTT transport specific data. */
|
/** @brief MQTT transport specific data. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue