You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/04/24 08:00:37 UTC

[GitHub] andrzej-kaczmarek closed pull request #59: nimble/host: Fix parsing event type for ext adv reports

andrzej-kaczmarek closed pull request #59: nimble/host: Fix parsing event type for ext adv reports
URL: https://github.com/apache/mynewt-nimble/pull/59
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/nimble/host/src/ble_hs_hci_evt.c b/nimble/host/src/ble_hs_hci_evt.c
index 61250845..989bc3d2 100644
--- a/nimble/host/src/ble_hs_hci_evt.c
+++ b/nimble/host/src/ble_hs_hci_evt.c
@@ -578,7 +578,7 @@ ble_hs_hci_evt_le_ext_adv_rpt(uint8_t subevent, uint8_t *data, int len)
 
     params = &ext_adv->params[0];
     for (i = 0; i < num_reports; i++) {
-        desc.props = (params->evt_type) & 0xFF;
+        desc.props = (params->evt_type) & 0x1F;
         if (desc.props & BLE_HCI_ADV_LEGACY_MASK) {
             legacy_event_type = ble_hs_hci_decode_legacy_type(params->evt_type);
             if (legacy_event_type < 0) {
@@ -587,7 +587,7 @@ ble_hs_hci_evt_le_ext_adv_rpt(uint8_t subevent, uint8_t *data, int len)
             }
             desc.legacy_event_type = legacy_event_type;
         } else {
-            desc.data_status = params->evt_type >> 8;
+            desc.data_status = (params->evt_type & BLE_HCI_ADV_DATA_STATUS_MASK) >> 5;
         }
         desc.addr.type = params->addr_type;
         memcpy(desc.addr.val, params->addr, 6);


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services