[PATCH] openbsc[master]: lchan release in error state: SACCH deact only for SACCH pchans

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Fri Dec 9 01:42:41 UTC 2016


Review at  https://gerrit.osmocom.org/1397

lchan release in error state: SACCH deact only for SACCH pchans

Change-Id: Iaf46782329b38ba8f3d438e6c75c2d467b852734
---
M openbsc/include/openbsc/gsm_data_shared.h
M openbsc/src/libbsc/abis_rsl.c
M openbsc/src/libcommon/gsm_data_shared.c
3 files changed, 17 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/97/1397/1

diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index 4ec4f69..9407b82 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -891,6 +891,7 @@
 struct gsm_lchan *rsl_lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr,
 				   int *rc);
 
+enum gsm_phys_chan_config ts_pchan(struct gsm_bts_trx_ts *ts);
 uint8_t ts_subslots(struct gsm_bts_trx_ts *ts);
 bool ts_is_tch(struct gsm_bts_trx_ts *ts);
 
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index b7f7a75..2c016a6 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_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)
diff --git a/openbsc/src/libcommon/gsm_data_shared.c b/openbsc/src/libcommon/gsm_data_shared.c
index df204fe..387af70 100644
--- a/openbsc/src/libcommon/gsm_data_shared.c
+++ b/openbsc/src/libcommon/gsm_data_shared.c
@@ -729,7 +729,7 @@
 };
 
 /*! Return the actual pchan type, also heeding dynamic TS. */
-static enum gsm_phys_chan_config ts_pchan(struct gsm_bts_trx_ts *ts)
+enum gsm_phys_chan_config ts_pchan(struct gsm_bts_trx_ts *ts)
 {
 	switch (ts->pchan) {
 	case GSM_PCHAN_TCH_F_TCH_H_PDCH:

-- 
To view, visit https://gerrit.osmocom.org/1397
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf46782329b38ba8f3d438e6c75c2d467b852734
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list