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
|
@ -341,17 +341,17 @@ struct mqtt_sec_config {
|
|||
/** @brief MQTT transport type. */
|
||||
enum mqtt_transport_type {
|
||||
/** Use non secure TCP transport for MQTT connection. */
|
||||
MQTT_TRANSPORT_NON_SECURE = 0x00,
|
||||
MQTT_TRANSPORT_NON_SECURE,
|
||||
|
||||
#if defined(CONFIG_MQTT_LIB_TLS)
|
||||
/** Use secure TCP transport (TLS) for MQTT connection. */
|
||||
MQTT_TRANSPORT_SECURE = 0x01,
|
||||
MQTT_TRANSPORT_SECURE,
|
||||
#endif /* CONFIG_MQTT_LIB_TLS */
|
||||
|
||||
/** Shall not be used as a transport type.
|
||||
* Indicator of maximum transport types possible.
|
||||
*/
|
||||
MQTT_TRANSPORT_NUM = 0x02
|
||||
MQTT_TRANSPORT_NUM
|
||||
};
|
||||
|
||||
/** @brief MQTT transport specific data. */
|
||||
|
|
Loading…
Reference in a new issue