linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Release conference call in telephony-maemo
@ 2010-01-28 15:19 Daniel Örstadius
  2010-01-30 15:23 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Örstadius @ 2010-01-28 15:19 UTC (permalink / raw)
  To: linux-bluetooth

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

Currently telephony-maemo only ends the first call found on
receiving AT+CHUP (hang up) from the headset. This patch checks
if the call is part of a conference call and in that case releases
the whole conference.

[-- Attachment #2: 0001-Release-conference-call-in-telephony-maemo.patch --]
[-- Type: text/x-patch, Size: 2220 bytes --]

From 83c71f16e235290146ad77ebbd4e818d0b520540 Mon Sep 17 00:00:00 2001
From: Daniel Orstadius <daniel.orstadius@gmail.com>
Date: Thu, 28 Jan 2010 17:14:40 +0200
Subject: [PATCH] Release conference call in telephony-maemo

Currently telephony-maemo only ends the first call found on
receiving AT+CHUP (hang up) from the headset. This patch checks
if the call is part of a conference call and in that case releases
the whole conference.
---
 audio/telephony-maemo.c |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/audio/telephony-maemo.c b/audio/telephony-maemo.c
index 98f4409..81bdfee 100644
--- a/audio/telephony-maemo.c
+++ b/audio/telephony-maemo.c
@@ -106,6 +106,7 @@ static uint32_t callerid = 0;
 #define CSD_CALL_INSTANCE	"com.nokia.csd.Call.Instance"
 #define CSD_CALL_CONFERENCE	"com.nokia.csd.Call.Conference"
 #define CSD_CALL_PATH		"/com/nokia/csd/call"
+#define CSD_CALL_CONFERENCE_PATH "/com/nokia/csd/call/conference"
 
 /* Call status values as exported by the CSD CALL plugin */
 #define CSD_CALL_STATUS_IDLE			0
@@ -313,6 +314,25 @@ static struct csd_call *find_call_with_status(int status)
 	return NULL;
 }
 
+static int release_conference(void)
+{
+	DBusMessage *msg;
+
+	debug("releasing conference call");
+	msg = dbus_message_new_method_call(CSD_CALL_BUS_NAME,
+						CSD_CALL_CONFERENCE_PATH,
+						CSD_CALL_INSTANCE,
+						"Release");
+	if (!msg) {
+		error("Unable to allocate new D-Bus message");
+		return -ENOMEM;
+	}
+
+	g_dbus_send_message(connection, msg);
+
+	return 0;
+}
+
 static int release_call(struct csd_call *call)
 {
 	DBusMessage *msg;
@@ -517,6 +537,7 @@ void telephony_last_dialed_number_req(void *telephony_device)
 void telephony_terminate_call_req(void *telephony_device)
 {
 	struct csd_call *call;
+	int err;
 
 	call = find_call_with_status(CSD_CALL_STATUS_ACTIVE);
 	if (!call)
@@ -529,7 +550,12 @@ void telephony_terminate_call_req(void *telephony_device)
 		return;
 	}
 
-	if (release_call(call) < 0)
+	if (call->conference)
+		err = release_conference();
+	else
+		err = release_call(call);
+
+	if (err < 0)
 		telephony_terminate_call_rsp(telephony_device,
 						CME_ERROR_AG_FAILURE);
 	else
-- 
1.6.0.4


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

* Re: [PATCH] Release conference call in telephony-maemo
  2010-01-28 15:19 [PATCH] Release conference call in telephony-maemo Daniel Örstadius
@ 2010-01-30 15:23 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2010-01-30 15:23 UTC (permalink / raw)
  To: Daniel Örstadius; +Cc: linux-bluetooth

Hi Daniel,

On Thu, Jan 28, 2010, Daniel Örstadius wrote:
> From 83c71f16e235290146ad77ebbd4e818d0b520540 Mon Sep 17 00:00:00 2001
> From: Daniel Orstadius <daniel.orstadius@gmail.com>
> Date: Thu, 28 Jan 2010 17:14:40 +0200
> Subject: [PATCH] Release conference call in telephony-maemo
> 
> Currently telephony-maemo only ends the first call found on
> receiving AT+CHUP (hang up) from the headset. This patch checks
> if the call is part of a conference call and in that case releases
> the whole conference.
> ---
>  audio/telephony-maemo.c |   28 +++++++++++++++++++++++++++-
>  1 files changed, 27 insertions(+), 1 deletions(-)

The patch has been pushed upstream (with a few minor cosmetic changes).
Thanks!

Johan

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

end of thread, other threads:[~2010-01-30 15:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-28 15:19 [PATCH] Release conference call in telephony-maemo Daniel Örstadius
2010-01-30 15:23 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).