Open Source Telephony
 help / color / mirror / Atom feed
From: Pekka Pessi <ppessi@gmail.com>
To: ofono@ofono.org
Subject: [PATCH] voicecall.c: use swap_without_accept method, if present
Date: Thu, 08 Oct 2009 19:59:52 +0300	[thread overview]
Message-ID: <1255021194-31138-1-git-send-email-ppessi@gmail.com> (raw)

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


             reply	other threads:[~2009-10-08 16:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-08 16:59 Pekka Pessi [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1255021194-31138-1-git-send-email-ppessi@gmail.com \
    --to=ppessi@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox