neels has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bsc/+/21969 )
Change subject: handover_test.c: properly release lchans in set-ts-use
......................................................................
handover_test.c: properly release lchans in set-ts-use
An upcoming test that uses set-ts-use to release used lchans uncovered
an incomplete release, keeping the lchans occupied due to a missing
release ack. Always ack the release.
Change-Id: Ia22906bfbfcc48b7bd08473a2b17f6b0554687d3
---
M tests/handover/handover_test.c
1 file changed, 11 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/69/21969/1
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index cbe0cf3..c0c5bb9 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -435,9 +435,20 @@
return lchan_act(lchan, full_rate, codec);
}
+static void lchan_release_ack(struct gsm_lchan *lchan)
+{
+ if (lchan->fi && lchan->fi->state == LCHAN_ST_WAIT_BEFORE_RF_RELEASE) {
+ /* don't wait before release */
+ osmo_fsm_inst_state_chg(lchan->fi,
LCHAN_ST_WAIT_RF_RELEASE_ACK, 0, 0);
+ /* ack the release */
+ osmo_fsm_inst_dispatch(lchan->fi, LCHAN_EV_RSL_RF_CHAN_REL_ACK,
0);
+ }
+}
+
static void lchan_clear(struct gsm_lchan *lchan)
{
lchan_release(lchan, true, false, 0);
+ lchan_release_ack(lchan);
}
static void ts_clear(struct gsm_bts_trx_ts *ts)
@@ -674,16 +685,6 @@
abis_rsl_rcvmsg(msg);
}
-static void lchan_release_ack(struct gsm_lchan *lchan)
-{
- if (lchan->fi && lchan->fi->state == LCHAN_ST_WAIT_BEFORE_RF_RELEASE) {
- /* don't wait before release */
- osmo_fsm_inst_state_chg(lchan->fi,
LCHAN_ST_WAIT_RF_RELEASE_ACK, 0, 0);
- /* ack the release */
- osmo_fsm_inst_dispatch(lchan->fi, LCHAN_EV_RSL_RF_CHAN_REL_ACK,
0);
- }
-}
-
/* override, requires '-Wl,--wrap=abis_rsl_sendmsg'.
* Catch RSL messages sent towards the BTS. */
int __real_abis_rsl_sendmsg(struct msgb *msg);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/21969
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ia22906bfbfcc48b7bd08473a2b17f6b0554687d3
Gerrit-Change-Number: 21969
Gerrit-PatchSet: 1
Gerrit-Owner: neels <[email protected]>
Gerrit-MessageType: newchange