linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ] Send the Extended Error result code, if requested in the failure cases
@ 2012-01-12 15:15 Syam Sidhardhan
  2012-01-12 19:41 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Syam Sidhardhan @ 2012-01-12 15:15 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Syam Sidhardhan

If HF has already requested for the Extended Error result code reporting,
then send the same in certain failure cases. Earlier in this case we were
sending normal error.
---
 audio/headset.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/audio/headset.c b/audio/headset.c
index 6aef6a8..c5ea58b 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -1331,7 +1331,8 @@ static gboolean rfcomm_io_cb(GIOChannel *chan, GIOCondition cond,
 		if (err == -EINVAL) {
 			error("Badly formated or unrecognized command: %s",
 					&slc->buf[slc->data_start]);
-			err = headset_send(hs, "\r\nERROR\r\n");
+			err = telephony_generic_rsp(device,
+						CME_ERROR_NOT_SUPPORTED);
 			if (err < 0)
 				goto failed;
 		} else if (err < 0)
-- 
1.7.4.1


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

end of thread, other threads:[~2012-01-12 19:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-12 15:15 [PATCH BlueZ] Send the Extended Error result code, if requested in the failure cases Syam Sidhardhan
2012-01-12 19:41 ` 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).