laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35468?usp=email )

Change subject: l1sap: fix logic error in gsmtap_csd_rlp_process()
......................................................................

l1sap: fix logic error in gsmtap_csd_rlp_process()

Current code evaluates as follows:

   (trx->arfcn | is_uplink) ? GSMTAP_ARFCN_F_UPLINK : 0

while we want it to be evaluated as follows:

   trx->arfcn | (is_uplink ? GSMTAP_ARFCN_F_UPLINK : 0)

Change-Id: Ida3d684968a3e4a45531d4b6d7b6af170e3e39f4
Fixes: CID#338165
---
M src/common/l1sap.c
1 file changed, 24 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve




diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index e9095de..11f5e3f 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1858,6 +1858,7 @@
        struct gsmtap_inst *inst = trx->bts->gsmtap.inst;
        struct osmo_rlp_frame_decoded rlpf;
        pbit_t *rlp_buf;
+       uint16_t arfcn;
        int byte_len;

        if (!inst || !trx->bts->gsmtap.rlp)
@@ -1916,8 +1917,11 @@
                        return;
        }

-       gsmtap_send_ex(inst, GSMTAP_TYPE_GSM_RLP, trx->arfcn | is_uplink ? 
GSMTAP_ARFCN_F_UPLINK : 0,
-                      lchan->ts->nr,
+       arfcn = trx->arfcn;
+       if (is_uplink)
+               arfcn |= GSMTAP_ARFCN_F_UPLINK;
+
+       gsmtap_send_ex(inst, GSMTAP_TYPE_GSM_RLP, arfcn, lchan->ts->nr,
                       lchan->type == GSM_LCHAN_TCH_H ? GSMTAP_CHANNEL_VOICE_H 
: GSMTAP_CHANNEL_VOICE_F,
                       lchan->nr, tch_ind->fn, tch_ind->rssi, 0, rlp_buf, 
byte_len);


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/35468?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ida3d684968a3e4a45531d4b6d7b6af170e3e39f4
Gerrit-Change-Number: 35468
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanits...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-MessageType: merged

Reply via email to