Attention is currently required from: laforge.

Hoernchen has posted comments on this change by Hoernchen. ( 
https://gerrit.osmocom.org/c/python/pyosmocom/+/43171?usp=email )

Change subject: tlv: preserve the comprehension bit
......................................................................


Patch Set 1:

(1 comment)

File src/osmocom/tlv.py:

https://gerrit.osmocom.org/c/python/pyosmocom/+/43171/comment/97067343_d68b9bfc?usp=email
 :
PS1, Line 638:            if x.tag > 0xff:
             :                 # two byte tag: the comprehension bit is 0x8000!
             :                 if x.tag & 0x8000 == 0:
             :                     print("Fixing up COMPR_TLV_IE class %s: 
tag=0x%x has no comprehension bit" % (name, x.tag))
             :                     x.tag = x.tag | 0x8000
> what exactly is the difference here? isn't this change semantically identical?
No, because the original condition was AND, so if either part didnt match it 
would fall through to the elif and that is what clobbered the two byte tag. As 
the comment says two byte is 0x8000 - precisely the part in the previous AND 
that would fail.



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

Gerrit-MessageType: comment
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: Ifae37785e2a586d9130d154bc7244f35fa6f2a55
Gerrit-Change-Number: 43171
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Attention: laforge <[email protected]>
Gerrit-Comment-Date: Thu, 06 Aug 2026 21:31:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <[email protected]>

Reply via email to