summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtest/hangup-active12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/hangup-active b/test/hangup-active
index 52dd2c6a..6444b23d 100755
--- a/test/hangup-active
+++ b/test/hangup-active
@@ -15,9 +15,15 @@ manager = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.VoiceCallManager')
calls = manager.GetCalls()
-path = calls[0][0]
-call = dbus.Interface(bus.get_object('org.ofono', path),
+for path, properties in calls:
+ state = properties["State"]
+ print "[ %s ] %s" % (path, state)
+
+ if state != "active":
+ continue
+
+ call = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.VoiceCall')
-call.Hangup()
+ call.Hangup()