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/10/05 11:35:37 UTC

[GitHub] rymanluk closed pull request #208: nimble/host: Allow to configure non-connectable scannable advertising

rymanluk closed pull request #208: nimble/host: Allow to configure non-connectable scannable advertising
URL: https://github.com/apache/mynewt-nimble/pull/208
 
 
   

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_gap.c b/nimble/host/src/ble_gap.c
index b315f012..50463690 100644
--- a/nimble/host/src/ble_gap.c
+++ b/nimble/host/src/ble_gap.c
@@ -2373,7 +2373,7 @@ ble_gap_ext_adv_params_validate(const struct ble_gap_ext_adv_params *params)
     }
 
     if (params->directed) {
-        if (params->scannable) {
+        if (params->scannable && params->connectable) {
             return BLE_HS_EINVAL;
         }
     }
@@ -2793,7 +2793,7 @@ ble_gap_ext_adv_rsp_set_validate(uint8_t instance,  struct os_mbuf *data)
     }
 
     /* not allowed with directed advertising */
-    if (ble_gap_slave[instance].directed) {
+    if (ble_gap_slave[instance].directed && ble_gap_slave[instance].connectable) {
         return BLE_HS_EINVAL;
     }
 


 

----------------------------------------------------------------
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