diff options
authorPau Espin Pedrol <pespin@sysmocom.de>2017-05-30 17:20:30 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-05-30 15:26:00 +0000
commit0993bf6f980b1673df46be9f89206c1f860b1d45 (patch)
parent765c1d9ce3070941bf3f06d61973f3280c81fb8c (diff)
ofono_client: Fix race condition when checking for required features
I got a backtrace in which the modem was lacking feature 'net'. That happens for 2 reasons: 1- net feature is not shown unless the modem is Online (at least for sierra modems) 2- Even after it has been set online, a lapse of time can pass before the feature gets shown. This was added in 896f08f6ab275e60104d2a442b8d1040ce61ca76 "fix: refresh dbus object when interfaces have changed" with the expectation that the 'Features' list would be available in all modem states. Since it depends on being powered and online, the same functionality is already provided by checking the Interfaces list, hence this code can be dropped entirely. Change-Id: Iedd62235d1a3a8b917ad4ac0b61b9c5dbf0fe43c
1 files changed, 0 insertions, 9 deletions
diff --git a/src/osmo_gsm_tester/ofono_client.py b/src/osmo_gsm_tester/ofono_client.py
index ce937d0..38e5772 100644
--- a/src/osmo_gsm_tester/ofono_client.py
+++ b/src/osmo_gsm_tester/ofono_client.py
@@ -243,14 +243,6 @@ class ModemDbusInteraction(log.Origin):
def is_online(self):
return self.property_is('Online', True)
- def require_features(self, *required):
- '''Make sure the given feature strings are present in
- properties()['Features'], raise an exception otherwise.'''
- features = set(self.properties().get('Features'))
- r = set(required)
- if not (r < features):
- self.raise_exn('This modem lacks features:', r - features)
class Modem(log.Origin):
@@ -265,7 +257,6 @@ class Modem(log.Origin):
self.sms_received_list = []
self.dbus = ModemDbusInteraction(self.path)
- self.dbus.require_features('sms', 'net')
self.dbus.required_signals = {
I_SMS: ( ('IncomingMessage', self._on_incoming_message), ),