Change in ...osmo-ttcn3-hacks[master]: Revert "library/PCUIF_Types.ttcn: inform RAW codec about PADDING in P...

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

fixeria gerrit-no-reply at lists.osmocom.org
Wed Sep 11 15:06:36 UTC 2019


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15488


Change subject: Revert "library/PCUIF_Types.ttcn: inform RAW codec about PADDING in PCUIF_data"
......................................................................

Revert "library/PCUIF_Types.ttcn: inform RAW codec about PADDING in PCUIF_data"

This reverts commit dd6d5d1baa62dc9d50fa90ef01fccb8a10284d53.

The PADDING seems to be a very experimental feature of TITAN. It works
very well for decoding of messages, so the padding bytes are getting
recognized as expected, but encoding is broken. Not only the data
buffer and its length are encoded in a wrong way, but other fields too.

Change-Id: Ieefa61232eb215a19a02e490255332e28e23b8f8
---
M library/PCUIF_Types.ttcn
1 file changed, 2 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/88/15488/1

diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index 721eb64..27d9b92 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -77,15 +77,10 @@
 	PCUIF_Text	text
 } with { variant "" };
 
-/* This is a bad side of the current protocol design: fixed-size buffer is located
- * in between the other fields of the message, so if the payload is smaller than
- * 162 octets (1296 bits), we need to fill the remaining space with padding. */
-type octetstring PCUIF_DataPad with { variant "ALIGN(left), PADDING(1296)" };
-
 type record PCUIF_data {
 	PCUIF_Sapi	sapi,
 	uint8_t		len,
-	PCUIF_DataPad	data,
+	octetstring	data length(162),
 	uint32_t	fn,
 	uint16_t	arfcn,
 	uint8_t		trx_nr,
@@ -95,7 +90,7 @@
 	uint16_t	ber10k,
 	int16_t		ta_offs_qbits,
 	int16_t		lqual_cb
-} with { variant (len) "LENGTHTO(data)" };
+} with { variant (data) "FIELDLENGTH(162), ALIGN(left)" };
 
 type record PCUIF_data_cnf_dt {
 	PCUIF_Sapi	sapi,

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ieefa61232eb215a19a02e490255332e28e23b8f8
Gerrit-Change-Number: 15488
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190911/c55dc59a/attachment.htm>


More information about the gerrit-log mailing list