BLE - Fix exclusion of getMaxAdvertisingSetNumber and getMaxAdvertisingDataLength

pull/9790/head
Vincent Coubard 2019-02-28 16:29:21 +00:00
parent 3142f26def
commit eeca03f952
2 changed files with 16 additions and 14 deletions

View File

@ -93,8 +93,10 @@ class GenericGap :
typedef typename LegacyGap::Role_t Role_t; typedef typename LegacyGap::Role_t Role_t;
// Imports from Gap // Imports from Gap
#if BLE_ROLE_BROADCASTER
using ble::interface::Gap<GenericGap>::getMaxAdvertisingSetNumber; using ble::interface::Gap<GenericGap>::getMaxAdvertisingSetNumber;
using ble::interface::Gap<GenericGap>::getMaxAdvertisingDataLength; using ble::interface::Gap<GenericGap>::getMaxAdvertisingDataLength;
#endif // BLE_ROLE_BROADCASTER
using ble::interface::Gap<GenericGap>::isFeatureSupported; using ble::interface::Gap<GenericGap>::isFeatureSupported;
using ble::interface::Gap<GenericGap>::useVersionOneAPI; using ble::interface::Gap<GenericGap>::useVersionOneAPI;
using ble::interface::Gap<GenericGap>::useVersionTwoAPI; using ble::interface::Gap<GenericGap>::useVersionTwoAPI;

View File

@ -2234,7 +2234,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
} }
uint8_t new_handle = LEGACY_ADVERTISING_HANDLE + 1; uint8_t new_handle = LEGACY_ADVERTISING_HANDLE + 1;
uint8_t end = getMaxAdvertisingSetNumber(); uint8_t end = getMaxAdvertisingSetNumber_();
*handle = INVALID_ADVERTISING_HANDLE; *handle = INVALID_ADVERTISING_HANDLE;
@ -2271,7 +2271,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
if (handle >= getMaxAdvertisingSetNumber()) { if (handle >= getMaxAdvertisingSetNumber_()) {
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
@ -2308,7 +2308,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
useVersionTwoAPI(); useVersionTwoAPI();
#if BLE_FEATURE_EXTENDED_ADVERTISING #if BLE_FEATURE_EXTENDED_ADVERTISING
if (handle >= getMaxAdvertisingSetNumber()) { if (handle >= getMaxAdvertisingSetNumber_()) {
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
@ -2350,7 +2350,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
const AdvertisingParameters &params const AdvertisingParameters &params
) )
{ {
if (handle >= getMaxAdvertisingSetNumber()) { if (handle >= getMaxAdvertisingSetNumber_()) {
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
@ -2466,7 +2466,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
); );
#if BLE_FEATURE_EXTENDED_ADVERTISING #if BLE_FEATURE_EXTENDED_ADVERTISING
if (handle >= getMaxAdvertisingSetNumber()) { if (handle >= getMaxAdvertisingSetNumber_()) {
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
@ -2575,7 +2575,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
ble_error_t error = BLE_ERROR_NONE; ble_error_t error = BLE_ERROR_NONE;
#if BLE_FEATURE_EXTENDED_ADVERTISING #if BLE_FEATURE_EXTENDED_ADVERTISING
if (handle >= getMaxAdvertisingSetNumber()) { if (handle >= getMaxAdvertisingSetNumber_()) {
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
@ -2634,7 +2634,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
ble_error_t status; ble_error_t status;
#if BLE_FEATURE_EXTENDED_ADVERTISING #if BLE_FEATURE_EXTENDED_ADVERTISING
if (handle >= getMaxAdvertisingSetNumber()) { if (handle >= getMaxAdvertisingSetNumber_()) {
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
@ -2686,7 +2686,7 @@ bool GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandl
{ {
useVersionTwoAPI(); useVersionTwoAPI();
if (handle >= getMaxAdvertisingSetNumber()) { if (handle >= getMaxAdvertisingSetNumber_()) {
return false; return false;
} }
@ -2711,7 +2711,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
if (handle >= getMaxAdvertisingSetNumber()) { if (handle >= getMaxAdvertisingSetNumber_()) {
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
@ -2739,7 +2739,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
if (handle >= getMaxAdvertisingSetNumber()) { if (handle >= getMaxAdvertisingSetNumber_()) {
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
@ -2747,7 +2747,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
if (payload.size() > getMaxAdvertisingDataLength()) { if (payload.size() > getMaxAdvertisingDataLength_()) {
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
@ -2801,7 +2801,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
if (handle >= getMaxAdvertisingSetNumber()) { if (handle >= getMaxAdvertisingSetNumber_()) {
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
@ -2835,7 +2835,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
if (handle >= getMaxAdvertisingSetNumber()) { if (handle >= getMaxAdvertisingSetNumber_()) {
return BLE_ERROR_INVALID_PARAM; return BLE_ERROR_INVALID_PARAM;
} }
@ -2861,7 +2861,7 @@ bool GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandl
{ {
useVersionTwoAPI(); useVersionTwoAPI();
if (handle >= getMaxAdvertisingSetNumber()) { if (handle >= getMaxAdvertisingSetNumber_()) {
return false; return false;
} }