BLE: Resolve issue with address type in advertising report.

pull/6188/head
Vincent Coubard 2018-03-01 15:48:21 +00:00
commit f0405690b7
2 changed files with 7 additions and 3 deletions

View File

@ -2348,7 +2348,7 @@ public:
* @param[in] type Advertising type of the packet.
* @param[in] advertisingDataLen Length of the advertisement data received.
* @param[in] advertisingData Pointer to the advertisement packet's data.
* @param[in] addressType address type of the peer.
* @param[in] addressType Type of the address of the peer that has emitted the packet.
*/
void processAdvertisementReport(
const BLEProtocol::AddressBytes_t peerAddr,
@ -2357,8 +2357,12 @@ public:
GapAdvertisingParams::AdvertisingType_t type,
uint8_t advertisingDataLen,
const uint8_t *advertisingData,
BLEProtocol::AddressType_t addressType
BLEProtocol::AddressType_t addressType = BLEProtocol::AddressType::RANDOM_STATIC
) {
// FIXME: remove default parameter for addressType when ST shield is merged;
// this has been added to mitigate the lack of dependency management in
// testing jobs ....
AdvertisementCallbackParams_t params;
memcpy(params.peerAddr, peerAddr, ADDR_LEN);
params.rssi = rssi;

View File

@ -169,7 +169,7 @@ static void maximHandler(wsfEventMask_t event, wsfMsgHdr_t *pMsg)
(GapAdvertisingParams::AdvertisingType_t)scanReport->eventType,
scanReport->len,
scanReport->pData,
(BLEProtocol::AddressType_t) scan->scanReport.addrType);
(BLEProtocol::AddressType_t) scanReport->addrType);
}
break;
case DM_CONN_OPEN_IND: