mirror of
https://github.com/espressif/esp-mqtt.git
synced 2025-07-31 11:18:01 +02:00
fix: Allow MQTT v5 zero length payload
Merges https://github.com/espressif/esp-mqtt/pull/250
This commit is contained in:
committed by
David Cermak
parent
1011e63cbe
commit
65a4fdaff5
@ -101,7 +101,7 @@ esp_err_t esp_mqtt5_get_publish_data(esp_mqtt5_client_handle_t client, uint8_t *
|
|||||||
uint16_t property_len = 0;
|
uint16_t property_len = 0;
|
||||||
esp_mqtt5_publish_resp_property_t property = {0};
|
esp_mqtt5_publish_resp_property_t property = {0};
|
||||||
*msg_data = mqtt5_get_publish_property_payload(msg_buf, msg_read_len, msg_topic, msg_topic_len, &property, &property_len, msg_data_len, &client->event.property->user_property);
|
*msg_data = mqtt5_get_publish_property_payload(msg_buf, msg_read_len, msg_topic, msg_topic_len, &property, &property_len, msg_data_len, &client->event.property->user_property);
|
||||||
if (*msg_data_len == 0 || *msg_data == NULL) {
|
if (*msg_data == NULL) {
|
||||||
ESP_LOGE(TAG, "%s: mqtt5_get_publish_property_payload() failed", __func__);
|
ESP_LOGE(TAG, "%s: mqtt5_get_publish_property_payload() failed", __func__);
|
||||||
return ESP_FAIL;
|
return ESP_FAIL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user