Change in pysim[master]: cards: fix reading of EF.HPLMNwAcT in Card.update_hplmn_act()

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

laforge gerrit-no-reply at lists.osmocom.org
Sat Feb 15 19:11:37 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/16945 )

Change subject: cards: fix reading of EF.HPLMNwAcT in Card.update_hplmn_act()
......................................................................

cards: fix reading of EF.HPLMNwAcT in Card.update_hplmn_act()

Change-Id: I35848059d6082c379246c8d695cb094c20780d15
---
M pySim/cards.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/pySim/cards.py b/pySim/cards.py
index a49fe43..1552ff1 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -76,8 +76,8 @@
 		access_tech = 'FFFF' # All technologues selected, even Reserved for Future Use ones
 		"""
 		# get size and write EF.HPLMNwAcT
-		r = self._scc.select_file(EF['HPLMNwAcT'])
-		size = int(r[-1][4:8], 16)
+		data = self._scc.read_binary(EF['HPLMNwAcT'], length=None, offset=0)
+		size = len(data[0])/2
 		hplmn = enc_plmn(mcc, mnc)
 		content = hplmn + access_tech
 		data, sw = self._scc.update_binary(EF['HPLMNwAcT'], content + 'ffffff0000' * (size/5-1))

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I35848059d6082c379246c8d695cb094c20780d15
Gerrit-Change-Number: 16945
Gerrit-PatchSet: 10
Gerrit-Owner: herlesupreeth <herlesupreeth at gmail.com>
Gerrit-Assignee: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: herlesupreeth <herlesupreeth at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200215/b0789ead/attachment.htm>


More information about the gerrit-log mailing list