You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2019/06/11 16:30:17 UTC
[mynewt-nimble] 01/02: nimble/gap: Fix validation of periodic
advertising parameters
This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit c5efe4612010152520ec8ebcb0cec82d271f7208
Author: Szymon Janc <sz...@codecoup.pl>
AuthorDate: Tue Jun 11 14:59:51 2019 +0200
nimble/gap: Fix validation of periodic advertising parameters
This allows to fallback to sane defaults if application doesn't
provide any intervals.
---
nimble/host/src/ble_gap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c
index e54aff1..3bc6bb1 100644
--- a/nimble/host/src/ble_gap.c
+++ b/nimble/host/src/ble_gap.c
@@ -3133,10 +3133,10 @@ ble_gap_periodic_adv_params_validate(
return BLE_HS_EINVAL;
}
- if (params->itvl_min > 0xffff || params->itvl_min < 6) {
+ if (params->itvl_min && params->itvl_min < 6) {
return BLE_HS_EINVAL;
}
- if (params->itvl_max > 0xffff || params->itvl_max < 6) {
+ if (params->itvl_max && params->itvl_max < 6) {
return BLE_HS_EINVAL;
}
return 0;