matanp has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/41415?usp=email ) Change subject: handover_decision: Check for connection prerequisites ...................................................................... handover_decision: Check for connection prerequisites Before this fix, a handover could be started while subscriber doesn't have a connection or while an initial assignment is stiil going. In some cases, it would cause the assert in handover_request to fail. Change-Id: I37314bdadd306ea96963d020b7c5372323e4640d --- M src/osmo-bsc/handover_decision.c 1 file changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/15/41415/1 diff --git a/src/osmo-bsc/handover_decision.c b/src/osmo-bsc/handover_decision.c index 2fb466c..2cb12a3 100644 --- a/src/osmo-bsc/handover_decision.c +++ b/src/osmo-bsc/handover_decision.c @@ -234,6 +234,20 @@ if (mr->num_cell > 0 && mr->num_cell < 7) process_meas_neigh(mr); + /* check for ongoing handover/assignment */ + if (!mr->lchan->conn) { + LOGPHOLCHAN(mr->lchan, LOGL_ERROR, "Skipping, No subscriber connection???\n"); + return; + } + if (mr->lchan->conn->assignment.new_lchan) { + LOGPHOLCHAN(mr->lchan, LOGL_INFO, "Skipping, Initial Assignment is still ongoing\n"); + return; + } + if (mr->lchan->conn->ho.fi) { + LOGPHOLCHAN(mr->lchan, LOGL_INFO, "Skipping, Handover still ongoing\n"); + return; + } + av_rxlev = get_meas_rep_avg(mr->lchan, TDMA_MEAS_FIELD_RXLEV, TDMA_MEAS_DIR_DL, TDMA_MEAS_SET_AUTO, ho_get_hodec1_rxlev_avg_win(bts->ho)); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/41415?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I37314bdadd306ea96963d020b7c5372323e4640d Gerrit-Change-Number: 41415 Gerrit-PatchSet: 1 Gerrit-Owner: matanp <matan1008@gmail.com>