aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-11-04 20:53:22 +0100
committerlaforge <laforge@osmocom.org>2021-11-05 13:17:09 +0000
commit5dcafedc333034060fc914265ad76e52d2682a5b (patch)
treeaba4219f0a5c80e2dee906f6997b9ec0560d39bf
parent333d8787ff9861416b28eca6a0cb4816b8814e5e (diff)
gsm_ts_release(): Make sure pchan{,is_want} is reset to NONE
Let's make sure all ts->pchan* related data is reset when we release the TS. This is important for pchan_is, since in bts-trx upon shutdown finish the PDCH lchan of a osmo dyn TS is set to lchan->state=LCHAN_S_NONE, and as a result when the PCU tries to release it by means of PCUIF act_req later, it may be ignored since the lchan is already in erased state. Related: SYS#4971 Change-Id: Ic7c34c0de23101ce094ffd03e00b4d2f6a551152
-rw-r--r--src/common/gsm_data.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/gsm_data.c b/src/common/gsm_data.c
index 44469589..e5dbf105 100644
--- a/src/common/gsm_data.c
+++ b/src/common/gsm_data.c
@@ -314,4 +314,8 @@ void gsm_ts_release(struct gsm_bts_trx_ts *ts)
struct gsm_lchan *lchan = &ts->lchan[ln];
gsm_lchan_release(lchan, LCHAN_REL_ACT_OML);
}
+ ts->pchan = GSM_PCHAN_NONE;
+ /* Make sure pchan_is is reset, since PCU act_req to release it will be
+ * ignored as the lchan will already be released. */
+ ts->dyn.pchan_is = ts->dyn.pchan_want = GSM_PCHAN_NONE;
}