From: Pekka Pessi <[email protected]>

---
 src/voicecall.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/voicecall.c b/src/voicecall.c
index eff6321..1be907a 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -835,11 +835,31 @@ static DBusMessage *manager_transfer(DBusConnection *conn,
        return NULL;
 }
 
+static DBusMessage *manager_swap_without_accept(DBusConnection *conn,
+                                               DBusMessage *msg, void *data)
+{
+       struct ofono_voicecall *vc = data;
+
+       if (vc->flags & VOICECALLS_FLAG_PENDING)
+               return __ofono_error_busy(msg);
+
+       vc->flags |= VOICECALLS_FLAG_PENDING;
+       vc->pending = dbus_message_ref(msg);
+
+       vc->driver->swap_without_accept(vc, generic_callback, vc);
+
+       return NULL;
+}
+
+
 static DBusMessage *manager_swap_calls(DBusConnection *conn,
                                        DBusMessage *msg, void *data)
 {
        struct ofono_voicecall *vc = data;
 
+       if (vc->driver->swap_without_accept)
+               return manager_swap_without_accept(conn, msg, data);
+
        if (vc->flags & VOICECALLS_FLAG_PENDING)
                return __ofono_error_busy(msg);
 
-- 
1.6.0.4

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to