mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-17 02:48:34 +03:00
runtime: fix tracking of selected_adf
The class property selected_adf is not updated in all locations where an ADF is selected, this means that we may loose track of the currently selected ADF in some locations Change-Id: I4cc0c58ff887422b4f3954d35c8380ddc00baa1d Related: OS#5418
This commit is contained in:
@@ -111,6 +111,7 @@ class RuntimeState:
|
||||
for f in sorted(set(apps_profile) - set(apps_taken), key=str):
|
||||
try:
|
||||
data, sw = self.card.select_adf_by_aid(f.aid)
|
||||
self.selected_adf = f
|
||||
if sw == "9000":
|
||||
print(" %s: %s" % (f.name, f.aid))
|
||||
apps_taken.append(f)
|
||||
@@ -344,6 +345,7 @@ class RuntimeLchan:
|
||||
try:
|
||||
if isinstance(f, CardADF):
|
||||
(data, sw) = self.rs.card.select_adf_by_aid(f.aid, scc=self.scc)
|
||||
self.selected_adf = f
|
||||
else:
|
||||
(data, sw) = self.scc.select_file(f.fid)
|
||||
self.selected_file = f
|
||||
|
||||
Reference in New Issue
Block a user