[PATCH] osmo-pcu[master]: GSMTAP: fix category checks in pcu_rx_data_ind and pcu_l1if_...

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Aug 16 22:51:29 UTC 2017


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

GSMTAP: fix category checks in pcu_rx_data_ind and pcu_l1if_tx_ptcch

We needto shift the PCU_GSMTAP_C_* constants before comparing against
the mask of enabled GSMTAP categories.

Change-Id: Ieb9332c65ed7bd57baf1aeab5ab722f92fc23b24
---
M src/pcu_l1_if.cpp
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 8ea2ad5..50e181e 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -183,7 +183,7 @@
 {
 	struct gprs_rlcmac_bts *bts = bts_main_data();
 
-	if (bts->gsmtap_categ_mask & PCU_GSMTAP_C_DL_PTCCH)
+	if (bts->gsmtap_categ_mask & (1 << PCU_GSMTAP_C_DL_PTCCH))
 		gsmtap_send(bts->gsmtap, arfcn, ts, GSMTAP_CHANNEL_PTCCH, 0, fn, 0, 0, msg->data, msg->len);
 #ifdef ENABLE_DIRECT_PHY
 	if (bts->trx[trx].fl1h) {
@@ -277,7 +277,7 @@
 		rc = -EINVAL;
 	}
 
-	if (rc < 0 && (bts->gsmtap_categ_mask & PCU_GSMTAP_C_UL_UNKNOWN)) {
+	if (rc < 0 && (bts->gsmtap_categ_mask & (1 <<PCU_GSMTAP_C_UL_UNKNOWN))) {
 		gsmtap_send(bts->gsmtap, data_ind->arfcn | GSMTAP_ARFCN_F_UPLINK, data_ind->ts_nr,
 			    GSMTAP_CHANNEL_PACCH, 0, data_ind->fn, 0, 0, data_ind->data, data_ind->len);
 	}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb9332c65ed7bd57baf1aeab5ab722f92fc23b24
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list