mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
fix(nimble): modify logic to print mbuf in ble_hs_log_mbuf (v6.0)
This commit is contained in:
@@ -135,10 +135,10 @@ void ble_receive_apple_data_source(uint8_t *message, uint16_t message_len)
|
||||
uint32_t remain_attr_len = message_len - 5;
|
||||
uint8_t *attrs = &message[5];
|
||||
ESP_LOGI(NimBLE_ANCS_TAG, "recevice Notification Attributes response Command_id %d NotificationUID %" PRIu32, Command_id, NotificationUID);
|
||||
while(remian_attr_len >= 3) {
|
||||
while(remain_attr_len >= 3) {
|
||||
uint8_t AttributeID = attrs[0];
|
||||
uint16_t len = attrs[1] | (attrs[2] << 8);
|
||||
if(len > remian_attr_len - 3) {
|
||||
if(len > remain_attr_len - 3) {
|
||||
ESP_LOGE(NimBLE_ANCS_TAG, "data error");
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user