fix(nimble): modify logic to print mbuf in ble_hs_log_mbuf

This commit is contained in:
Sumeet Singh
2026-03-11 17:04:22 +05:30
parent 45e6fad7cd
commit 5c1a43ca3d
+4 -5
View File
@@ -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);
}
}