All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] voicecall: fix transfer
@ 2011-02-07 11:56 Andre Matos
  2011-02-07 19:46 ` Denis Kenzior
  2011-02-07 22:01 ` Denis Kenzior
  0 siblings, 2 replies; 11+ messages in thread
From: Andre Matos @ 2011-02-07 11:56 UTC (permalink / raw)
  To: ofono

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


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

end of thread, other threads:[~2011-02-07 22:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <AANLkTi=ATGSivr65py3FZ4wNEqOjivv7i7WPnSrdZ0q0@mail.gmail.com>
2011-02-07 22:12 ` [PATCH] voicecall: fix transfer andre matos
2011-02-07 22:30   ` Denis Kenzior
2011-02-07 11:56 Andre Matos
2011-02-07 19:46 ` 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

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.