[PATCH] openbsc[master]: cosmetic: rsl_rx_chan_act_ack(): use local lchan var in 14 i...

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
Sat Jul 23 20:25:57 UTC 2016


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

cosmetic: rsl_rx_chan_act_ack(): use local lchan var in 14 instances

In preparation for an upcoming change.

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


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/64/564/1

diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 013daec..e5183bc 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -979,34 +979,35 @@
 static int rsl_rx_chan_act_ack(struct msgb *msg)
 {
 	struct abis_rsl_dchan_hdr *rslh = msgb_l2(msg);
+	struct gsm_lchan *lchan = msg->lchan;
 
 	/* BTS has confirmed channel activation, we now need
 	 * to assign the activated channel to the MS */
 	if (rslh->ie_chan != RSL_IE_CHAN_NR)
 		return -EINVAL;
 
-	osmo_timer_del(&msg->lchan->act_timer);
+	osmo_timer_del(&lchan->act_timer);
 
-	if (msg->lchan->state == LCHAN_S_BROKEN) {
+	if (lchan->state == LCHAN_S_BROKEN) {
 		LOGP(DRSL, LOGL_NOTICE, "%s CHAN ACT ACK for broken channel.\n",
-			gsm_lchan_name(msg->lchan));
+			gsm_lchan_name(lchan));
 		return 0;
 	}
 
-	if (msg->lchan->state != LCHAN_S_ACT_REQ)
+	if (lchan->state != LCHAN_S_ACT_REQ)
 		LOGP(DRSL, LOGL_NOTICE, "%s CHAN ACT ACK, but state %s\n",
-			gsm_lchan_name(msg->lchan),
-			gsm_lchans_name(msg->lchan->state));
-	rsl_lchan_set_state(msg->lchan, LCHAN_S_ACTIVE);
+			gsm_lchan_name(lchan),
+			gsm_lchans_name(lchan->state));
+	rsl_lchan_set_state(lchan, LCHAN_S_ACTIVE);
 
-	if (msg->lchan->rqd_ref) {
-		rsl_send_imm_assignment(msg->lchan);
-		talloc_free(msg->lchan->rqd_ref);
-		msg->lchan->rqd_ref = NULL;
-		msg->lchan->rqd_ta = 0;
+	if (lchan->rqd_ref) {
+		rsl_send_imm_assignment(lchan);
+		talloc_free(lchan->rqd_ref);
+		lchan->rqd_ref = NULL;
+		lchan->rqd_ta = 0;
 	}
 
-	send_lchan_signal(S_LCHAN_ACTIVATE_ACK, msg->lchan, NULL);
+	send_lchan_signal(S_LCHAN_ACTIVATE_ACK, lchan, NULL);
 
 	return 0;
 }

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

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