mirror of
https://github.com/espressif/esp-mqtt.git
synced 2025-07-29 18:28:24 +02:00
Fix error code verification on SUBSCRIBE error
- Return codes other than 0x1, 0x2, 0x3 and 0x80 are reserved and forbidden by the specification.
This commit is contained in:
@ -1090,7 +1090,7 @@ static esp_err_t deliver_suback(esp_mqtt_client_handle_t client)
|
||||
client->event.error_handle->error_type = MQTT_ERROR_TYPE_NONE;
|
||||
client->event.error_handle->connect_return_code = MQTT_CONNECTION_ACCEPTED;
|
||||
// post data event
|
||||
if ((uint8_t)*msg_data >= 0x80) {
|
||||
if ((uint8_t)*msg_data == 0x80) {
|
||||
client->event.error_handle->error_type = MQTT_ERROR_TYPE_SUBSCRIBE_FAILED;
|
||||
}
|
||||
client->event.data_len = msg_data_len;
|
||||
|
Reference in New Issue
Block a user