Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH] voicecall.c: use swap_without_accept method, if present
@ 2009-10-08 16:59 Pekka Pessi
  2009-10-08 16:59 ` [PATCH] voicecall: allow sending DTMF tones while call is in alerting state Pekka Pessi
  2009-10-08 18:01 ` [PATCH] voicecall.c: use swap_without_accept method, if present Denis Kenzior
  0 siblings, 2 replies; 10+ messages in thread
From: Pekka Pessi @ 2009-10-08 16:59 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1137 bytes --]

From: Pekka Pessi <Pekka.Pessi@nokia.com>

---
 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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-10-09  6:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-08 16:59 [PATCH] voicecall.c: use swap_without_accept method, if present Pekka Pessi
2009-10-08 16:59 ` [PATCH] voicecall: allow sending DTMF tones while call is in alerting state Pekka Pessi
2009-10-08 16:59   ` [PATCH] voicecall: allow P or , within the dial string Pekka Pessi
2009-10-08 17:29     ` Denis Kenzior
2009-10-08 19:30       ` Pekka Pessi
2009-10-08 20:37         ` Denis Kenzior
2009-10-09  2:30           ` Pekka Pessi
2009-10-09  6:22             ` Denis Kenzior
2009-10-08 18:02   ` [PATCH] voicecall: allow sending DTMF tones while call is in alerting state Denis Kenzior
2009-10-08 18:01 ` [PATCH] voicecall.c: use swap_without_accept method, if present Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox