Change in ...osmo-pcu[master]: pcu_l1_if.cpp: Imm Assign PCH: clarify size of different items

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
Mon Oct 7 16:30:33 UTC 2019


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 <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191007/e1fc2cd6/attachment.htm>


More information about the gerrit-log mailing list