From cd6f44c8f1150c7cc4bcead865ebe2838f8232cc Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 6 Aug 2021 20:28:21 +0200 Subject: lchan_fsm_post_activ_ack(): return upon release The bottom of the function changes the lchan state. If a failure branch is reached, that should no longer happen. Change 'break' to 'return' in four places to not mix up the channel release. Related: SYS#5559 Change-Id: I4674752ab4f1c8e8147ef3366f90e9ea2abd5aec --- src/osmo-bsc/lchan_fsm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index aa616d09c..68cafb3c8 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -896,14 +896,14 @@ static void lchan_fsm_post_activ_ack(struct osmo_fsm_inst *fi) "lchan activation for assignment succeeded, but lchan has no conn:" " cannot trigger appropriate actions. Release.\n"); lchan_release(lchan, false, true, RSL_ERR_EQUIPMENT_FAIL, NULL); - break; + return; } if (!lchan->conn->assignment.fi) { LOG_LCHAN(lchan, LOGL_ERROR, "lchan activation for assignment succeeded, but lchan has no" " assignment ongoing: cannot trigger appropriate actions. Release.\n"); lchan_release(lchan, false, true, RSL_ERR_EQUIPMENT_FAIL, NULL); - break; + return; } /* After the Chan Activ Ack, the MS expects to receive an RR Assignment Command. * Let the assignment_fsm handle that. */ @@ -916,14 +916,14 @@ static void lchan_fsm_post_activ_ack(struct osmo_fsm_inst *fi) "lchan activation for handover succeeded, but lchan has no conn:" " cannot trigger appropriate actions. Release.\n"); lchan_release(lchan, false, true, RSL_ERR_EQUIPMENT_FAIL, NULL); - break; + return; } if (!lchan->conn->ho.fi) { LOG_LCHAN(lchan, LOGL_ERROR, "lchan activation for handover succeeded, but lchan has no" " handover ongoing: cannot trigger appropriate actions. Release.\n"); lchan_release(lchan, false, true, RSL_ERR_EQUIPMENT_FAIL, NULL); - break; + return; } /* After the Chan Activ Ack of the new lchan, send the MS an RR Handover Command on the * old channel. The handover_fsm handles that. */ -- cgit v1.2.3