All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Matos <andre.matos.ste@gmail.com>
To: ofono@ofono.org
Subject: [PATCH] voicecall: fix transfer
Date: Mon, 07 Feb 2011 12:56:53 +0100	[thread overview]
Message-ID: <1297079813-26573-1-git-send-email-andre.matos.ste@gmail.com> (raw)

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

From: Andre Carvalho de Matos <andre.carvalho.matos@stericsson.com>

transfer method should fail if you have a multiparty call, according to 22.091
section 8.11
---
 src/voicecall.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/voicecall.c b/src/voicecall.c
index f3f6a9b..f959f55 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -1339,6 +1339,7 @@ static DBusMessage *manager_transfer(DBusConnection *conn,
 	struct ofono_voicecall *vc = data;
 	int numactive;
 	int numheld;
+	int numconn;
 
 	if (vc->pending)
 		return __ofono_error_busy(msg);
@@ -1350,11 +1351,12 @@ static DBusMessage *manager_transfer(DBusConnection *conn,
 	 * implementing the call transfer operation for a call that is
 	 * still dialing/alerting.
 	 */
-	numactive += voicecalls_num_connecting(vc);
+	numconn = voicecalls_num_connecting(vc);
 
 	numheld = voicecalls_num_held(vc);
 
-	if ((numactive != 1) && (numheld != 1))
+	if ((numactive > 1 || numheld > 1) ||
+		((numheld + numactive + numconn) != 2))
 		return __ofono_error_failed(msg);
 
 	if (vc->driver->transfer == NULL)
-- 
1.7.0.4


             reply	other threads:[~2011-02-07 11:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07 11:56 Andre Matos [this message]
2011-02-07 19:46 ` [PATCH] voicecall: fix transfer Denis Kenzior
2011-02-07 20:37   ` andre matos
2011-02-07 21:05     ` Denis Kenzior
2011-02-07 21:24       ` andre matos
2011-02-07 21:30         ` Denis Kenzior
2011-02-07 21:48           ` andre matos
2011-02-07 22:00             ` Denis Kenzior
2011-02-07 22:01 ` Denis Kenzior
     [not found] <AANLkTi=ATGSivr65py3FZ4wNEqOjivv7i7WPnSrdZ0q0@mail.gmail.com>
2011-02-07 22:12 ` andre matos
2011-02-07 22:30   ` 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=1297079813-26573-1-git-send-email-andre.matos.ste@gmail.com \
    --to=andre.matos.ste@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.