Change in osmocom-bb[master]: trx_toolkit/trxd_proto.py: fix encoding of TRXDv0 Tx PDUs

fixeria gerrit-no-reply at lists.osmocom.org
Fri Apr 30 20:33:07 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/24013 )


Change subject: trx_toolkit/trxd_proto.py: fix encoding of TRXDv0 Tx PDUs
......................................................................

trx_toolkit/trxd_proto.py: fix encoding of TRXDv0 Tx PDUs

Change-Id: I9da59f7e7c47dd1cac833839165ba05de6b18144
Related: OS#4006, SYS#4895
---
M src/target/trx_toolkit/trxd_proto.py
1 file changed, 4 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/13/24013/1

diff --git a/src/target/trx_toolkit/trxd_proto.py b/src/target/trx_toolkit/trxd_proto.py
index 7afa484..ded0336 100644
--- a/src/target/trx_toolkit/trxd_proto.py
+++ b/src/target/trx_toolkit/trxd_proto.py
@@ -125,9 +125,10 @@
 
 class PDUv1Tx(PDUv0Tx):
 	# Same structure as PDUv0Tx, only the version is different
-	def __init__(self, *args, **kw):
-		PDUv0Tx.__init__(self, *args, **kw)
-		self.STRUCT[0]._fields[0].val = 1
+	STRUCT = (
+		Header(ver=1),
+		*PDUv0Tx.STRUCT[1:]
+	)
 
 
 class PDUv2Rx(codec.Envelope):

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I9da59f7e7c47dd1cac833839165ba05de6b18144
Gerrit-Change-Number: 24013
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210430/22ec7458/attachment.htm>


More information about the gerrit-log mailing list