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 2019/01/08 13:12:38 UTC

[GitHub] andrzej-kaczmarek closed pull request #279: nimble/host: Stop ble_hs_timer on startup only in unit tests

andrzej-kaczmarek closed pull request #279: nimble/host: Stop ble_hs_timer on startup only in unit tests
URL: https://github.com/apache/mynewt-nimble/pull/279
 
 
   

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_hs.c b/nimble/host/src/ble_hs.c
index 749fc3be..086bfb13 100644
--- a/nimble/host/src/ble_hs.c
+++ b/nimble/host/src/ble_hs.c
@@ -644,10 +644,12 @@ ble_hs_start(void)
 
     ble_hs_parent_task = ble_npl_get_current_task_id();
 
+#if MYNEWT_VAL(SELFTEST)
     /* Stop the timer just in case the host was already running (e.g., unit
      * tests).
      */
     ble_npl_callout_stop(&ble_hs_timer);
+#endif
 
     ble_npl_callout_init(&ble_hs_timer, ble_hs_evq, ble_hs_timer_exp, NULL);
 


 

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