lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34008 )


Change subject: Fix the remaining functions using the broken Card.update_ust() 
call
......................................................................

Fix the remaining functions using the broken Card.update_ust() call

Card.update_ust() got replaced by the file operation ust_update().
In addition to Change-Id I7a6a77b872a6f5d8c478ca75dcff8ea067b8203e

Fixes: f8d2e2ba0892 ("split pySim/legacy/{cards,utils} from 
pySim/{cards,utils}")
Change-Id: Ie6405cae37493a2101e5089a8d11766fbfed4518
---
M pySim/ts_31_102.py
M pySim/ts_31_103.py
2 files changed, 27 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/08/34008/1

diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py
index a90139d..c7a58f1 100644
--- a/pySim/ts_31_102.py
+++ b/pySim/ts_31_102.py
@@ -660,12 +660,14 @@
             super().__init__()

         def do_est_service_enable(self, arg):
-            """Enable a service within EF.UST"""
-            self._cmd.card.update_est(int(arg), 1)
+            """Enable a service within EF.EST"""
+            selected_file = self._cmd.lchan.selected_file
+            selected_file.ust_update(self._cmd, [int(arg)], [])

         def do_est_service_disable(self, arg):
-            """Disable a service within EF.UST"""
-            self._cmd.card.update_est(int(arg), 0)
+            """Disable a service within EF.EST"""
+            selected_file = self._cmd.lchan.selected_file
+            selected_file.ust_update(self._cmd, [], [int(arg)])

 # TS 31.102 Section 4.2.48
 class EF_ACL(TransparentEF):
@@ -1062,11 +1064,13 @@

         def do_prose_service_activate(self, arg):
             """Activate a service within EF.5G_PROSE_ST"""
-            self._cmd.card.update_ust(int(arg), 1)
+            selected_file = self._cmd.lchan.selected_file
+            selected_file.ust_update(self._cmd, [int(arg)], [])

         def do_prose_service_deactivate(self, arg):
             """Deactivate a service within EF.5G_PROSE_ST"""
-            self._cmd.card.update_ust(int(arg), 0)
+            selected_file = self._cmd.lchan.selected_file
+            selected_file.ust_update(self._cmd, [], [int(arg)])

 # TS 31.102 Section 4.4.13.3 (Rel 17)
 class EF_5G_PROSE_DD(TransparentEF):
diff --git a/pySim/ts_31_103.py b/pySim/ts_31_103.py
index 19ade2b..4327a1a 100644
--- a/pySim/ts_31_103.py
+++ b/pySim/ts_31_103.py
@@ -111,11 +111,13 @@

         def do_ist_service_activate(self, arg):
             """Activate a service within EF.IST"""
-            self._cmd.card.update_ist(int(arg), 1)
+            selected_file = self._cmd.lchan.selected_file
+            selected_file.ust_update(self._cmd, [int(arg)], [])

         def do_ist_service_deactivate(self, arg):
             """Deactivate a service within EF.IST"""
-            self._cmd.card.update_ist(int(arg), 0)
+            selected_file = self._cmd.lchan.selected_file
+            selected_file.ust_update(self._cmd, [], [int(arg)])

         def do_ist_service_check(self, arg):
             """Check consistency between services of this file and files 
present/activated.

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie6405cae37493a2101e5089a8d11766fbfed4518
Gerrit-Change-Number: 34008
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <[email protected]>
Gerrit-MessageType: newchange

Reply via email to