mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-06-05 21:04:49 +00:00
fix(nimble): modify logic to print mbuf in ble_hs_log_mbuf
This commit is contained in:
@@ -26,17 +26,16 @@ struct log ble_hs_log;
|
||||
void
|
||||
ble_hs_log_mbuf(const struct os_mbuf *om)
|
||||
{
|
||||
const struct os_mbuf *cur;
|
||||
uint8_t u8;
|
||||
int i;
|
||||
|
||||
if (om == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (cur = om; cur != NULL; cur = SLIST_NEXT(cur, om_next)) {
|
||||
for (i = 0; i < cur->om_len; i++) {
|
||||
BLE_HS_LOG(DEBUG, "0x%02x ", cur->om_data[i]);
|
||||
}
|
||||
for (i = 0; i < OS_MBUF_PKTLEN(om); i++) {
|
||||
os_mbuf_copydata(om, i, 1, &u8);
|
||||
BLE_HS_LOG(DEBUG, "0x%02x ", u8);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user