[PATCH] osmo-gsm-tester[master]: modem: Remove ctx after deactivating it

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

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Fri Feb 16 14:14:40 UTC 2018


Review at  https://gerrit.osmocom.org/6520

modem: Remove ctx after deactivating it

Change-Id: Ib0e2a8ae8d9885fa44c9cc1f7dc7c7948abd683c
---
M src/osmo_gsm_tester/modem.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/20/6520/1

diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py
index f0a0b24..5afd2d1 100644
--- a/src/osmo_gsm_tester/modem.py
+++ b/src/osmo_gsm_tester/modem.py
@@ -618,6 +618,9 @@
         ctx = systembus_get(ctx_id)
         ctx.SetProperty('Active', Variant('b', False))
         event_loop.wait(self, lambda: ctx.GetProperties()['Active'] == False)
+        self.dbg('deactivate_context active=false, removing', path=ctx_id)
+        connmgr = self.dbus.interface(I_CONNMGR)
+        connmgr.RemoveContext(ctx_id)
         self.log('context deactivated', path=ctx_id)
 
     def sms_send(self, to_msisdn_or_modem, *tokens):

-- 
To view, visit https://gerrit.osmocom.org/6520
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0e2a8ae8d9885fa44c9cc1f7dc7c7948abd683c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list