From: Syam Sidhardhan <s.syam@samsung.com>
To: linux-bluetooth@vger.kernel.org
Cc: Syam Sidhardhan <s.syam@samsung.com>
Subject: [PATCH] Send the Extended Error result code, if requested in the failure cases
Date: Wed, 11 Jan 2012 21:33:11 +0530 [thread overview]
Message-ID: <1326297791-8533-1-git-send-email-s.syam@samsung.com> (raw)
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 | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/audio/headset.c b/audio/headset.c
index 6aef6a8..5455340 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -1331,7 +1331,13 @@ 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");
+
+ if (slc->cme_enabled)
+ err = headset_send(hs, "\r\n+CME ERROR: %d\r\n",
+ CME_ERROR_NOT_SUPPORTED);
+ else
+ err = headset_send(hs, "\r\nERROR\r\n");
+
if (err < 0)
goto failed;
} else if (err < 0)
--
1.7.4.1
next reply other threads:[~2012-01-11 16:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-11 16:03 Syam Sidhardhan [this message]
2012-01-11 16:42 ` [PATCH] Send the Extended Error result code, if requested in the failure cases Johan Hedberg
2012-01-12 15:35 ` Syam Sidhardhan
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=1326297791-8533-1-git-send-email-s.syam@samsung.com \
--to=s.syam@samsung.com \
--cc=linux-bluetooth@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox