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


Change subject: pcu_l1_if.cpp: Imm Assign PCH: clarify size of different items
......................................................................

pcu_l1_if.cpp: Imm Assign PCH: clarify size of different items

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



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

diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 6a0d58e..70d76f7 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -209,7 +209,7 @@
 {
        struct gprs_rlcmac_bts *bts = bts_main_data();
        uint8_t data[23]; /* prefix PLEN */
-
+
        /* FIXME: why does OpenBTS has no PLEN and no fill in message? */
        bitvec_pack(block, data + 1);
        data[0] = (plen << 2) | 0x01;
@@ -223,7 +223,7 @@
 void pcu_l1if_tx_pch(bitvec * block, int plen, const char *imsi)
 {
        struct gprs_rlcmac_bts *bts = bts_main_data();
-       uint8_t data[3+1+23]; /* prefix PLEN */
+       uint8_t data[3 + 1 + 22]; /* paging group + PLEN + imm assign */

        /* paging group */
        if (!imsi || strlen(imsi) < 3)
@@ -233,14 +233,14 @@
        data[1] = imsi[1];
        data[2] = imsi[2];

-       OSMO_ASSERT(block->data_len <= sizeof(data) - (3+1));
-       bitvec_pack(block, data + 3+1);
+       OSMO_ASSERT(block->data_len <= sizeof(data) - (3 + 1));
+       bitvec_pack(block, data + 3 + 1);
        data[3] = (plen << 2) | 0x01;

        if (bts->gsmtap_categ_mask & (1 << PCU_GSMTAP_C_DL_PCH))
-               gsmtap_send(bts->gsmtap, 0, 0, GSMTAP_CHANNEL_PCH, 0, 0, 0, 0, 
data + 3, 23);
+               gsmtap_send(bts->gsmtap, 0, 0, GSMTAP_CHANNEL_PCH, 0, 0, 0, 0, 
data + 3, 1 + 22);

-       pcu_tx_data_req(0, 0, PCU_IF_SAPI_PCH, 0, 0, 0, data, 23+3);
+       pcu_tx_data_req(0, 0, PCU_IF_SAPI_PCH, 0, 0, 0, data, 3 + 1 + 22);
 }

 extern "C" void pcu_rx_block_time(uint16_t arfcn, uint32_t fn, uint8_t ts_no)

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I32876858e3e93951e965b0fc7875c95c1f36f3ac
Gerrit-Change-Number: 15683
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pes...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to