aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-10-17 01:03:53 +0200
committerHarald Welte <laforge@gnumonks.org>2016-12-09 11:35:41 +0000
commitec16c161932c16280d7b4bdf8e72262e7f81c873 (patch)
tree9e567ec2b826fea9c8c72a200f9d425d8df5b80e /openbsc/src/libbsc
parentf788d933824cf9757d58a1e84843c7c33523e71c (diff)
lchan release in error state: SACCH deact only for SACCH pchans
This is useful particularly in case where we deactivate PDCHs which don't have a SACCH associated. The existin code would always attempt to deactivate a SACCH even in those cases, leading to the BTS responsding with related error messages. Change-Id: Iaf46782329b38ba8f3d438e6c75c2d467b852734
Diffstat (limited to 'openbsc/src/libbsc')
-rw-r--r--openbsc/src/libbsc/abis_rsl.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index b7f7a75c..2c016a6e 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -898,9 +898,23 @@ static int rsl_rf_chan_release(struct gsm_lchan *lchan, int error,
*/
static int rsl_rf_chan_release_err(struct gsm_lchan *lchan)
{
+ enum sacch_deact sacch_deact;
if (lchan->state != LCHAN_S_ACTIVE)
return 0;
- return rsl_rf_chan_release(lchan, 1, SACCH_DEACTIVATE);
+ switch (ts_pchan(lchan->ts)) {
+ case GSM_PCHAN_TCH_F:
+ case GSM_PCHAN_TCH_H:
+ case GSM_PCHAN_CCCH_SDCCH4:
+ case GSM_PCHAN_CCCH_SDCCH4_CBCH:
+ case GSM_PCHAN_SDCCH8_SACCH8C:
+ case GSM_PCHAN_SDCCH8_SACCH8C_CBCH:
+ sacch_deact = SACCH_DEACTIVATE;
+ break;
+ default:
+ sacch_deact = SACCH_NONE;
+ break;
+ }
+ return rsl_rf_chan_release(lchan, 1, sacch_deact);
}
static int rsl_rx_rf_chan_rel_ack(struct gsm_lchan *lchan)