MariuszSkamra commented on a change in pull request #115: debug: Add missing 
debug logs for LE Meta Events
URL: https://github.com/apache/mynewt-nimble/pull/115#discussion_r191156115
 
 

 ##########
 File path: nimble/host/src/ble_hs_dbg.c
 ##########
 @@ -149,6 +149,188 @@ ble_hs_dbg_le_event_disp(uint8_t subev, uint8_t len, 
uint8_t *evdata)
                        get_le16(evdata + 1), evdata[3], evdata[4]);
         break;
 
+    case BLE_HCI_LE_SUBEV_DIRECT_ADV_RPT:
+    {
+        struct hci_le_subev_direct_adv_rpt *data = (void *) evdata;
+        struct hci_le_subev_direct_adv_rpt_param *params = data->params;
+
+        if (len < sizeof(*data) ||
+                len < sizeof(*data) + data->num_reports * sizeof(*params)) {
+            BLE_HS_LOG(DEBUG, "Corrupted LE Directed Advertising Report "
+                       "len=%u\n", len);
+            break;
+        }
+
+        BLE_HS_LOG(DEBUG, "LE Extended Advertising Report len=%u "
 
 Review comment:
   good catch!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to