mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] rymanluk closed pull request #23: nimble/ll: Fix HCI Set Resolving Timeout
Date Tue, 03 Apr 2018 13:57:18 GMT
rymanluk closed pull request #23: nimble/ll: Fix HCI Set Resolving Timeout
URL: https://github.com/apache/mynewt-nimble/pull/23
 
 
   

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/controller/src/ble_ll_resolv.c b/nimble/controller/src/ble_ll_resolv.c
index 8d17f87d..46518584 100644
--- a/nimble/controller/src/ble_ll_resolv.c
+++ b/nimble/controller/src/ble_ll_resolv.c
@@ -368,13 +368,18 @@ ble_ll_resolv_set_rpa_tmo(uint8_t *cmdbuf)
         return BLE_ERR_INV_HCI_CMD_PARMS;
     }
 
-    if (!g_ble_ll_resolv_data.addr_res_enabled) {
-        return BLE_ERR_CMD_DISALLOWED;
+    g_ble_ll_resolv_data.rpa_tmo = tmo_secs * OS_TICKS_PER_SEC;
+
+    /* If resolving is not enabled, we are done here. */
+    if (!ble_ll_resolv_enabled()) {
+        return BLE_ERR_SUCCESS;
     }
 
-    g_ble_ll_resolv_data.rpa_tmo = tmo_secs * OS_TICKS_PER_SEC;
-    return os_callout_reset(&g_ble_ll_resolv_data.rpa_timer,
-                            (int32_t)g_ble_ll_resolv_data.rpa_tmo);
+    /* Reset timeout if resolving is enabled */
+    os_callout_reset(&g_ble_ll_resolv_data.rpa_timer,
+                     (int32_t)g_ble_ll_resolv_data.rpa_tmo);
+
+    return BLE_ERR_SUCCESS;
 }
 
 int


 

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

Mime
View raw message