[PATCH] openbsc[master]: prepare dyn TS: act lchan: fetch the channel mode a bit later

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
Mon Jul 25 15:57:04 UTC 2016


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

prepare dyn TS: act lchan: fetch the channel mode a bit later

Change-Id: I66d88ad6a4ae7bee1e552960fd4e92aff953125c
---
M openbsc/src/libbsc/abis_rsl.c
1 file changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/92/592/1

diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 6a02633..49ece5f 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -446,14 +446,6 @@
 	struct rsl_ie_chan_mode cm;
 	struct gsm48_chan_desc cd;
 
-	rc = channel_mode_from_lchan(&cm, lchan);
-	if (rc < 0) {
-		LOGP(DRSL, LOGL_ERROR,
-		     "%s Cannot find channel mode from lchan type\n",
-		     gsm_ts_and_pchan_name(lchan->ts));
-		return rc;
-	}
-
 	/* If a TCH_F/PDCH TS is in PDCH mode, deactivate PDCH first. */
 	if (lchan->ts->pchan == GSM_PCHAN_TCH_F_PDCH
 	    && (lchan->ts->flags & TS_F_PDCH_ACTIVE)) {
@@ -463,6 +455,14 @@
 		return rsl_ipacc_pdch_activate(lchan->ts, 0);
 	}
 
+	rc = channel_mode_from_lchan(&cm, lchan);
+	if (rc < 0) {
+		LOGP(DRSL, LOGL_ERROR,
+		     "%s Cannot find channel mode from lchan type\n",
+		     gsm_ts_and_pchan_name(lchan->ts));
+		return rc;
+	}
+
 	rsl_lchan_set_state(lchan, LCHAN_S_ACT_REQ);
 
 	ta = lchan->rqd_ta;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66d88ad6a4ae7bee1e552960fd4e92aff953125c
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