laforge submitted this change.
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(-)
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 change 43986. To unsubscribe, or for help writing mail filters, visit settings.