rymanluk commented on a change in pull request #777: nimble/host: Clear master 
and slave states on host reset
URL: https://github.com/apache/mynewt-nimble/pull/777#discussion_r397814492
 
 

 ##########
 File path: nimble/host/src/ble_hs.c
 ##########
 @@ -376,18 +375,12 @@ ble_hs_reset(void)
 
     ble_hs_clear_rx_queue();
 
-    while (1) {
-        conn_handle = ble_hs_atomic_first_conn_handle();
-        if (conn_handle == BLE_HS_CONN_HANDLE_NONE) {
-            break;
-        }
-
-        ble_gap_conn_broken(conn_handle, ble_hs_reset_reason);
-    }
-
     /* Clear configured addresses. */
     ble_hs_id_reset();
 
+    /* Clear adverising and scanning states. */
+    ble_gap_reset_state(ble_hs_reset_reason);
 
 Review comment:
   I would call it before the `ble_hs_id_reset()`. It probably will change 
nothing, but since before we were calling `ble_gap_conn_broken()` before that I 
don't see a reason to change that.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to