Change in osmo-pcu[master]: pdch::rcv_resource_request(): Use local var to store bts pointer

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/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Nov 2 17:51:45 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/26078 )


Change subject: pdch::rcv_resource_request(): Use local var to store bts pointer
......................................................................

pdch::rcv_resource_request(): Use local var to store bts pointer

Change-Id: Ica727c4b70cecc0ddb5d2a235bfc416735754b61
---
M src/pdch.cpp
1 file changed, 7 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/78/26078/1

diff --git a/src/pdch.cpp b/src/pdch.cpp
index 5d8658a..c65c699 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -613,15 +613,16 @@
 {
 	struct gprs_rlcmac_sba *sba;
 	int rc;
+	struct gprs_rlcmac_bts *bts = trx->bts;
 
 	if (request->ID.UnionType) {
 		struct gprs_rlcmac_ul_tbf *ul_tbf = NULL;
 		struct pdch_ulc_node *item;
 		uint32_t tlli = request->ID.u.TLLI;
 
-		GprsMs *ms = bts_ms_by_tlli(bts(), tlli, GSM_RESERVED_TMSI);
+		GprsMs *ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
 		if (!ms) {
-			ms = bts_alloc_ms(bts(), 0, 0); /* ms class updated later */
+			ms = bts_alloc_ms(bts, 0, 0); /* ms class updated later */
 			ms_set_tlli(ms, tlli);
 		}
 
@@ -707,9 +708,9 @@
 				ms_set_egprs_ms_class(ms, egprs_ms_class);
 		}
 
-		ul_tbf = tbf_alloc_ul_pacch(bts(), ms, trx_no());
+		ul_tbf = tbf_alloc_ul_pacch(bts, ms, trx_no());
 		if (!ul_tbf) {
-			handle_tbf_reject(bts(), ms, trx_no(), ts_no);
+			handle_tbf_reject(bts, ms, trx_no(), ts_no);
 			goto return_unref;
 		}
 
@@ -738,7 +739,7 @@
 	if (request->ID.u.Global_TFI.UnionType) {
 		struct gprs_rlcmac_dl_tbf *dl_tbf;
 		int8_t tfi = request->ID.u.Global_TFI.u.DOWNLINK_TFI;
-		dl_tbf = bts_dl_tbf_by_tfi(bts(), tfi, trx_no(), ts_no);
+		dl_tbf = bts_dl_tbf_by_tfi(bts, tfi, trx_no(), ts_no);
 		if (!dl_tbf) {
 			LOGP(DRLCMAC, LOGL_NOTICE, "PACKET RESOURCE REQ unknown downlink TFI=%d\n", tfi);
 			return;
@@ -751,7 +752,7 @@
 	} else {
 		struct gprs_rlcmac_ul_tbf *ul_tbf;
 		int8_t tfi = request->ID.u.Global_TFI.u.UPLINK_TFI;
-		ul_tbf = bts_ul_tbf_by_tfi(bts(), tfi, trx_no(), ts_no);
+		ul_tbf = bts_ul_tbf_by_tfi(bts, tfi, trx_no(), ts_no);
 		if (!ul_tbf) {
 			LOGP(DRLCMAC, LOGL_NOTICE, "PACKET RESOURCE REQ unknown uplink TFI=%d\n", tfi);
 			return;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/26078
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ica727c4b70cecc0ddb5d2a235bfc416735754b61
Gerrit-Change-Number: 26078
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211102/96a7c8e6/attachment.htm>


More information about the gerrit-log mailing list