Skip to content

Commit 1ca7347

Browse files
Merge branch 'mqtt5_fixing_typo' into 'master'
PR: fixing typos in `mqtt5_error_reason_code` See merge request espressif/esp-mqtt!188
2 parents fe32d8f + 90b4a45 commit 1ca7347

File tree

2 files changed

+47
-42
lines changed

2 files changed

+47
-42
lines changed

include/mqtt5_client.h

Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,41 +19,46 @@ typedef struct esp_mqtt_client *esp_mqtt5_client_handle_t;
1919
* MQTT5 protocol error reason code, more details refer to MQTT5 protocol document section 2.4
2020
*/
2121
enum mqtt5_error_reason_code {
22-
MQTT5_UNSPECIFIED_ERROR = 0x80,
23-
MQTT5_MALFORMED_PACKET = 0x81,
24-
MQTT5_PROTOCOL_ERROR = 0x82,
25-
MQTT5_IMPLEMENT_SPECIFIC_ERROR = 0x83,
26-
MQTT5_UNSUPPORTED_PROTOCOL_VER = 0x84,
27-
MQTT5_INVAILD_CLIENT_ID = 0x85,
28-
MQTT5_BAD_USERNAME_OR_PWD = 0x86,
29-
MQTT5_NOT_AUTHORIZED = 0x87,
30-
MQTT5_SERVER_UNAVAILABLE = 0x88,
31-
MQTT5_SERVER_BUSY = 0x89,
32-
MQTT5_BANNED = 0x8A,
33-
MQTT5_SERVER_SHUTTING_DOWN = 0x8B,
34-
MQTT5_BAD_AUTH_METHOD = 0x8C,
35-
MQTT5_KEEP_ALIVE_TIMEOUT = 0x8D,
36-
MQTT5_SESSION_TAKEN_OVER = 0x8E,
37-
MQTT5_TOPIC_FILTER_INVAILD = 0x8F,
38-
MQTT5_TOPIC_NAME_INVAILD = 0x90,
39-
MQTT5_PACKET_IDENTIFIER_IN_USE = 0x91,
40-
MQTT5_PACKET_IDENTIFIER_NOT_FOUND = 0x92,
41-
MQTT5_RECEIVE_MAXIMUM_EXCEEDED = 0x93,
42-
MQTT5_TOPIC_ALIAS_INVAILD = 0x94,
43-
MQTT5_PACKET_TOO_LARGE = 0x95,
44-
MQTT5_MESSAGE_RATE_TOO_HIGH = 0x96,
45-
MQTT5_QUOTA_EXCEEDED = 0x97,
46-
MQTT5_ADMINISTRATIVE_ACTION = 0x98,
47-
MQTT5_PAYLOAD_FORMAT_INVAILD = 0x99,
48-
MQTT5_RETAIN_NOT_SUPPORT = 0x9A,
49-
MQTT5_QOS_NOT_SUPPORT = 0x9B,
50-
MQTT5_USE_ANOTHER_SERVER = 0x9C,
51-
MQTT5_SERVER_MOVED = 0x9D,
52-
MQTT5_SHARED_SUBSCR_NOT_SUPPORTED = 0x9E,
53-
MQTT5_CONNECTION_RATE_EXCEEDED = 0x9F,
54-
MQTT5_MAXIMUM_CONNECT_TIME = 0xA0,
55-
MQTT5_SUBSCRIBE_IDENTIFIER_NOT_SUPPORT = 0xA1,
56-
MQTT5_WILDCARD_SUBSCRIBE_NOT_SUPPORT = 0xA2,
22+
MQTT5_UNSPECIFIED_ERROR = 0x80,
23+
MQTT5_MALFORMED_PACKET = 0x81,
24+
MQTT5_PROTOCOL_ERROR = 0x82,
25+
MQTT5_IMPLEMENT_SPECIFIC_ERROR = 0x83,
26+
MQTT5_UNSUPPORTED_PROTOCOL_VER = 0x84,
27+
MQTT5_INVAILD_CLIENT_ID __attribute__((deprecated)) = 0x85,
28+
MQTT5_INVALID_CLIENT_ID = 0x85,
29+
MQTT5_BAD_USERNAME_OR_PWD = 0x86,
30+
MQTT5_NOT_AUTHORIZED = 0x87,
31+
MQTT5_SERVER_UNAVAILABLE = 0x88,
32+
MQTT5_SERVER_BUSY = 0x89,
33+
MQTT5_BANNED = 0x8A,
34+
MQTT5_SERVER_SHUTTING_DOWN = 0x8B,
35+
MQTT5_BAD_AUTH_METHOD = 0x8C,
36+
MQTT5_KEEP_ALIVE_TIMEOUT = 0x8D,
37+
MQTT5_SESSION_TAKEN_OVER = 0x8E,
38+
MQTT5_TOPIC_FILTER_INVAILD __attribute__((deprecated)) = 0x8F,
39+
MQTT5_TOPIC_FILTER_INVALID = 0x8F,
40+
MQTT5_TOPIC_NAME_INVAILD __attribute__((deprecated)) = 0x90,
41+
MQTT5_TOPIC_NAME_INVALID = 0x90,
42+
MQTT5_PACKET_IDENTIFIER_IN_USE = 0x91,
43+
MQTT5_PACKET_IDENTIFIER_NOT_FOUND = 0x92,
44+
MQTT5_RECEIVE_MAXIMUM_EXCEEDED = 0x93,
45+
MQTT5_TOPIC_ALIAS_INVAILD __attribute__((deprecated)) = 0x94,
46+
MQTT5_TOPIC_ALIAS_INVALID = 0x94,
47+
MQTT5_PACKET_TOO_LARGE = 0x95,
48+
MQTT5_MESSAGE_RATE_TOO_HIGH = 0x96,
49+
MQTT5_QUOTA_EXCEEDED = 0x97,
50+
MQTT5_ADMINISTRATIVE_ACTION = 0x98,
51+
MQTT5_PAYLOAD_FORMAT_INVAILD __attribute__((deprecated)) = 0x99,
52+
MQTT5_PAYLOAD_FORMAT_INVALID = 0x99,
53+
MQTT5_RETAIN_NOT_SUPPORT = 0x9A,
54+
MQTT5_QOS_NOT_SUPPORT = 0x9B,
55+
MQTT5_USE_ANOTHER_SERVER = 0x9C,
56+
MQTT5_SERVER_MOVED = 0x9D,
57+
MQTT5_SHARED_SUBSCR_NOT_SUPPORTED = 0x9E,
58+
MQTT5_CONNECTION_RATE_EXCEEDED = 0x9F,
59+
MQTT5_MAXIMUM_CONNECT_TIME = 0xA0,
60+
MQTT5_SUBSCRIBE_IDENTIFIER_NOT_SUPPORT = 0xA1,
61+
MQTT5_WILDCARD_SUBSCRIBE_NOT_SUPPORT = 0xA2,
5762
};
5863

5964
/**
@@ -65,7 +70,7 @@ typedef struct mqtt5_user_property_list_t *mqtt5_user_property_handle_t;
6570
* MQTT5 protocol connect properties and will properties configuration, more details refer to MQTT5 protocol document section 3.1.2.11 and 3.3.2.3
6671
*/
6772
typedef struct {
68-
uint32_t session_expiry_interval; /*!< The interval time of session expiry */
73+
uint32_t session_expiry_interval; /*!< The interval time of session expiry */
6974
uint32_t maximum_packet_size; /*!< The maximum packet size that we can receive */
7075
uint16_t receive_maximum; /*!< The maximum pakcket count that we process concurrently */
7176
uint16_t topic_alias_maximum; /*!< The maximum topic alias that we support */
@@ -270,7 +275,7 @@ uint8_t esp_mqtt5_client_get_user_property_count(mqtt5_user_property_handle_t us
270275
* @brief Free the user property list
271276
*
272277
* @param user_property user_property handle
273-
*
278+
*
274279
* This API will free the memory in user property list and free user_property itself
275280
*/
276281
void esp_mqtt5_client_delete_user_property(mqtt5_user_property_handle_t user_property);

mqtt5_client.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static void esp_mqtt5_print_error_code(esp_mqtt5_client_handle_t client, int cod
173173
case MQTT5_UNSUPPORTED_PROTOCOL_VER:
174174
ESP_LOGW(TAG, "Unsupported Protocol Version");
175175
break;
176-
case MQTT5_INVAILD_CLIENT_ID:
176+
case MQTT5_INVALID_CLIENT_ID:
177177
ESP_LOGW(TAG, "Client Identifier not valid");
178178
break;
179179
case MQTT5_BAD_USERNAME_OR_PWD:
@@ -203,10 +203,10 @@ static void esp_mqtt5_print_error_code(esp_mqtt5_client_handle_t client, int cod
203203
case MQTT5_SESSION_TAKEN_OVER:
204204
ESP_LOGW(TAG, "Session taken over");
205205
break;
206-
case MQTT5_TOPIC_FILTER_INVAILD:
206+
case MQTT5_TOPIC_FILTER_INVALID:
207207
ESP_LOGW(TAG, "Topic Filter invalid");
208208
break;
209-
case MQTT5_TOPIC_NAME_INVAILD:
209+
case MQTT5_TOPIC_NAME_INVALID:
210210
ESP_LOGW(TAG, "Topic Name invalid");
211211
break;
212212
case MQTT5_PACKET_IDENTIFIER_IN_USE:
@@ -218,7 +218,7 @@ static void esp_mqtt5_print_error_code(esp_mqtt5_client_handle_t client, int cod
218218
case MQTT5_RECEIVE_MAXIMUM_EXCEEDED:
219219
ESP_LOGW(TAG, "Receive Maximum exceeded");
220220
break;
221-
case MQTT5_TOPIC_ALIAS_INVAILD:
221+
case MQTT5_TOPIC_ALIAS_INVALID:
222222
ESP_LOGW(TAG, "Topic Alias invalid");
223223
break;
224224
case MQTT5_PACKET_TOO_LARGE:
@@ -233,7 +233,7 @@ static void esp_mqtt5_print_error_code(esp_mqtt5_client_handle_t client, int cod
233233
case MQTT5_ADMINISTRATIVE_ACTION:
234234
ESP_LOGW(TAG, "Administrative action");
235235
break;
236-
case MQTT5_PAYLOAD_FORMAT_INVAILD:
236+
case MQTT5_PAYLOAD_FORMAT_INVALID:
237237
ESP_LOGW(TAG, "Payload format invalid");
238238
break;
239239
case MQTT5_RETAIN_NOT_SUPPORT:

0 commit comments

Comments
 (0)