From adaa72533a35ace0742aa3849b636ff3584014ba Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Fri, 4 Sep 2009 20:15:18 -0500 Subject: For incoming call case, send hangup CHLD=1X doesn't work for incoming calls on some devices. This is more portable --- src/voicecall.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/voicecall.c b/src/voicecall.c index 194ce83b..d2b8c388 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -287,7 +287,7 @@ static DBusMessage *voicecall_hangup(DBusConnection *conn, if (call->status == CALL_STATUS_DISCONNECTED) return __ofono_error_failed(msg); - if (!vc->driver->release_specific) + if (!vc->driver->release_specific || !vc->driver->hangup) return __ofono_error_not_implemented(msg); if (vc->flags & VOICECALLS_FLAG_PENDING) @@ -296,7 +296,10 @@ static DBusMessage *voicecall_hangup(DBusConnection *conn, vc->flags |= VOICECALLS_FLAG_PENDING; vc->pending = dbus_message_ref(msg); - vc->driver->release_specific(vc, call->id, + if (call->status == CALL_STATUS_INCOMING) + vc->driver->hangup(vc, generic_callback, vc); + else + vc->driver->release_specific(vc, call->id, generic_callback, vc); return NULL; -- cgit v1.2.3