---
 test/hangup |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/test/hangup b/test/hangup
index 6444b23..60858a8 100755
--- a/test/hangup
+++ b/test/hangup
@@ -3,6 +3,16 @@
 import sys
 import dbus
 
+if (len(sys.argv) < 2):
+       print "Usage: %s <call state>" % (sys.argv[0])
+       sys.exit(1)
+
+cstate = sys.argv[1]
+
+if cstate != "active" and cstate != "waiting" and cstate != "held":
+       print "Valid <call state> is active / waiting / held"
+       sys.exit(1)
+
 bus = dbus.SystemBus()
 
 manager = dbus.Interface(bus.get_object('org.ofono', '/'),
@@ -20,7 +30,7 @@ for path, properties in calls:
                state = properties["State"]
                print "[ %s ] %s" % (path, state)
 
-               if state != "active":
+               if state != cstate:
                        continue
 
                call = dbus.Interface(bus.get_object('org.ofono', path),
-- 
1.7.5.4

_______________________________________________
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono

Reply via email to