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


The following commit(s) were added to refs/heads/master by this push:
     new 338c8101 host/ble_gap.c: Fix failure to run callback on finished scan
338c8101 is described below

commit 338c81014ebb7be717446c18e53ea1d4e68b88e1
Author: Michal Gorecki <[email protected]>
AuthorDate: Mon Aug 22 11:39:56 2022 +0200

    host/ble_gap.c: Fix failure to run callback on finished scan
    
    When both roles - peripheral and central where turned off, removed lines 
where causing
    not calling callback function after completing the scan.
---
 nimble/host/src/ble_gap.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c
index ed959957..289ad591 100644
--- a/nimble/host/src/ble_gap.c
+++ b/nimble/host/src/ble_gap.c
@@ -917,21 +917,17 @@ ble_gap_disc_report(void *desc)
 static void
 ble_gap_disc_complete(void)
 {
-#if NIMBLE_BLE_CONNECT
     struct ble_gap_master_state state;
-#endif
     struct ble_gap_event event;
 
     memset(&event, 0, sizeof event);
     event.type = BLE_GAP_EVENT_DISC_COMPLETE;
     event.disc_complete.reason = 0;
 
-#if NIMBLE_BLE_CONNECT
     ble_gap_master_extract_state(&state, 1);
     if (ble_gap_has_client(&state)) {
         ble_gap_call_event_cb(&event, state.cb, state.cb_arg);
     }
-#endif
 
     ble_gap_event_listener_call(&event);
 }

Reply via email to