Repository: incubator-mynewt-larva Updated Branches: refs/heads/master 9263db577 -> 41991697b
Fix bug with remote read version control procedure where control procedure was being erroneously started and timing out Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/41991697 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/41991697 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/41991697 Branch: refs/heads/master Commit: 41991697b791bdb4c9ff3e68282218c4bc41adc2 Parents: 9263db5 Author: wes3 <w...@micosa.io> Authored: Tue Jan 26 00:47:41 2016 -0800 Committer: wes3 <w...@micosa.io> Committed: Tue Jan 26 00:47:41 2016 -0800 ---------------------------------------------------------------------- net/nimble/controller/src/ble_ll_ctrl.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/41991697/net/nimble/controller/src/ble_ll_ctrl.c ---------------------------------------------------------------------- diff --git a/net/nimble/controller/src/ble_ll_ctrl.c b/net/nimble/controller/src/ble_ll_ctrl.c index 0d84b8d..2eb072e 100644 --- a/net/nimble/controller/src/ble_ll_ctrl.c +++ b/net/nimble/controller/src/ble_ll_ctrl.c @@ -940,15 +940,13 @@ ble_ll_ctrl_chk_proc_start(struct ble_ll_conn_sm *connsm) * The version exchange is a special case. If we have already * received the information dont start it. */ - if (i == BLE_LL_CTRL_PROC_VERSION_XCHG) { - if (connsm->rxd_version_ind) { - ble_ll_hci_ev_rd_rem_ver(connsm, BLE_ERR_SUCCESS); - CLR_PENDING_CTRL_PROC(connsm, i); - } + if ((i == BLE_LL_CTRL_PROC_VERSION_XCHG) && (connsm->rxd_version_ind)) { + ble_ll_hci_ev_rd_rem_ver(connsm, BLE_ERR_SUCCESS); + CLR_PENDING_CTRL_PROC(connsm, i); + } else { + ble_ll_ctrl_proc_start(connsm, i); + break; } - - ble_ll_ctrl_proc_start(connsm, i); - break; } } }