public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Alok <develnewbie@gmail.com>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] [PATCH] HFP - Rejecting a call
Date: Wed, 09 Jan 2008 16:07:44 +0530	[thread overview]
Message-ID: <1199875064.6463.4.camel@greatbear> (raw)
In-Reply-To: <20080109002828.GB5883@ps.ms.mff.cuni.cz>

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

Hi Johan, 

Here is a patch which handles the "Call Rejection" use case.
Let me know if anything needs to be changed. 

Alok. 

[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 955 bytes --]

Index: audio/headset.c
===================================================================
RCS file: /cvsroot/bluez/utils/audio/headset.c,v
retrieving revision 1.155
diff -u -5 -p -r1.155 headset.c
--- audio/headset.c	9 Jan 2008 03:00:22 -0000	1.155
+++ audio/headset.c	9 Jan 2008 10:05:54 -0000
@@ -250,19 +250,21 @@ static int terminate_call(struct device 
 
 	dbus_connection_emit_signal(device->conn, device->path,
 			AUDIO_HEADSET_INTERFACE, "CallTerminated",
 			DBUS_TYPE_INVALID);
 
+	err = headset_send(hs, "\r\nOK\r\n");
+	if (err < 0)
+		return err;
+
 	if (hs->ring_timer) {
 		g_source_remove(hs->ring_timer);
 		hs->ring_timer = 0;
+		/*+CIEV: (callsetup = 0)*/
+		return headset_send(hs, "\r\n+CIEV:2, 0\r\n");
 	}
 
-	err = headset_send(hs, "\r\nOK\r\n");
-	if (err < 0)
-		return err;
-
 	/*+CIEV: (call = 0)*/
 	return headset_send(hs, "\r\n+CIEV:2, 0\r\n");
 }
 
 static int signal_gain_setting(struct device *device, const char *buf)

[-- Attachment #3: Type: text/plain, Size: 278 bytes --]

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  parent reply	other threads:[~2008-01-09 10:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-09  0:28 [Bluez-devel] error in headset capture, patch included Pavel Semerad
2008-01-09  3:03 ` Johan Hedberg
2008-01-09 10:37 ` Alok [this message]
2008-01-10 15:24 ` [Bluez-devel] [PATCH][HFP] - default device as hfp Alok
2008-01-10 15:36 ` [Bluez-devel] [PATCH][HFP] - Setting the inband Ringtone Alok

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=1199875064.6463.4.camel@greatbear \
    --to=develnewbie@gmail.com \
    --cc=bluez-devel@lists.sourceforge.net \
    /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