[XS] Change in pysim[master]: esim.saip: a ranged template file resolves to the start of its range
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/43986?usp=email ) Change subject: esim.saip: a ranged template file resolves to the start of its range ...................................................................... esim.saip: a ranged template file resolves to the start of its range The templates list a file defined over a FID range once per FID, all rows sharing one pe_name, and ProfileTemplate.__init_subclass__() indexed them by plain assignment, so the last row of each range won: a PE-PHONEBOOK whose ef-adn carries no fileID came out as EF.ADN at 4F5F, and EF.PBC, EF.UID, EF.EXT1 and EF.CCP1 likewise at the end of their ranges. Keep the first row listed for a pe_name, which is the start of the range in every template table. The folder osmocom-pysim-saip-template-range-fid of hampushellsberg-dev/PySIM-upstream-patches on GitHub has the analysis and a repro. Change-Id: Ifc218e68465e8a4bbdd2c3d960622538b3284c99 --- M pySim/esim/saip/templates.py 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim/esim/saip/templates.py b/pySim/esim/saip/templates.py index 50080b4..5dfe375 100644 --- a/pySim/esim/saip/templates.py +++ b/pySim/esim/saip/templates.py @@ -184,7 +184,11 @@ else: cur_df.children.append(f) f.parent = cur_df - cls.files_by_pename[f.pe_name] = f + # SAIP section 9.1: a file listed once per FID of a range shares one + # pe_name, and the first instance is created at the start of the + # range, so the first row listed is the one a PE without a fileID + # refers to. + cls.files_by_pename.setdefault(f.pe_name, f) ProfileTemplateRegistry.add(cls) @classmethod -- To view, visit https://gerrit.osmocom.org/c/pysim/+/43986?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ifc218e68465e8a4bbdd2c3d960622538b3284c99 Gerrit-Change-Number: 43986 Gerrit-PatchSet: 4 Gerrit-Owner: laforge <laforge@osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: jolly <andreas@eversberg.eu> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-CC: hampushellsberg <hampushellsberg@gmail.com>
participants (1)
-
laforge