Skip to contentSkip to conversation

test: Find the active call and do hangup on that.

PATCH In review Marit Henriksen 2 participants 2 messages Feb 3, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test: Find the active call and do hangup on that.

From: Marit Henriksen <[email protected]>

---
 test/hangup-active |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
test/hangup-active +9 -3
index 52dd2c6..6444b23 100755
@@ -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()
Signature · 1 line
1.7.1
#1 lore raw

Hi Marit,

Quoted 6 lines · Marit Henriksen

From: Marit Henriksen <[email protected]>

---
 test/hangup-active |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis