mirror of https://github.com/ARMmbed/mbed-os.git
handle legacy adv calls
parent
587eb9845e
commit
23dc808968
|
@ -1668,9 +1668,15 @@ ble_error_t GenericGap::setAdvertisingData(AdvHandle_t handle, const Advertising
|
||||||
if (!is_extended_advertising_enabled()) {
|
if (!is_extended_advertising_enabled()) {
|
||||||
if (handle == Gap::LEGACY_ADVERTISING_HANDLE) {
|
if (handle == Gap::LEGACY_ADVERTISING_HANDLE) {
|
||||||
if (scan_reponse) {
|
if (scan_reponse) {
|
||||||
memcpy(&getLegacyAdvertisingPayload(), payload, sizeof(AdvertisingData));
|
return _pal_gap.set_advertising_data(
|
||||||
|
payload->getPayloadLen(),
|
||||||
|
pal::advertising_data_t(payload->getPayload(), payload->getPayloadLen())
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
memcpy(&getLegacyAdvertisingScanResponse(), payload, sizeof(AdvertisingData));
|
return _pal_gap.set_scan_response_data(
|
||||||
|
payload->getPayloadLen(),
|
||||||
|
pal::advertising_data_t(payload->getPayload(), payload->getPayloadLen())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return BLE_ERROR_NOT_IMPLEMENTED;
|
return BLE_ERROR_NOT_IMPLEMENTED;
|
||||||
|
|
Loading…
Reference in New Issue