prasad-alatkar 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_r398557210
########## File path: nimble/host/src/ble_gap.c ########## @@ -1034,6 +1034,12 @@ ble_gap_master_failed(int status) ble_gap_master_connect_failure(status); break; + case BLE_GAP_OP_M_DISC: + STATS_INC(ble_gap_stats, initiate_fail); + ble_gap_disc_complete(); + ble_gap_master_reset_state(); Review comment: I think it is better if we keep `#if NIMBLE_BLE_CONNECT` or `#if NIMBLE_BLE_SCAN` outside of `ble_gap_master_failed` function. ---------------------------------------------------------------- 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