From: Syam Sidhardhan <s.syam@samsung.com>
To: linux-bluetooth@vger.kernel.org
Cc: Syam Sidhardhan <s.syam@samsung.com>
Subject: [PATCH 3/3] Send the Extended Error result code, if requested in the failure cases
Date: Thu, 24 Nov 2011 19:44:36 +0530 [thread overview]
Message-ID: <1322144076-1913-3-git-send-email-s.syam@samsung.com> (raw)
In-Reply-To: <1322144076-1913-1-git-send-email-s.syam@samsung.com>
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..2bddedc 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->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 prev parent reply other threads:[~2011-11-24 14:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-24 14:14 [PATCH 1/3] Fix dbus reply memory leak Syam Sidhardhan
2011-11-24 14:14 ` [PATCH 2/3] Remove unwanted GError* assignment to NULL Syam Sidhardhan
2011-12-02 11:18 ` Johan Hedberg
2011-12-02 11:25 ` Santiago Carot
2011-11-24 14:14 ` Syam Sidhardhan [this message]
2011-11-24 15:16 ` [PATCH 3/3] Send the Extended Error result code, if requested in the failure cases Syam Sidhardhan
2011-12-02 11:15 ` [PATCH 1/3] Fix dbus reply memory leak Johan Hedberg
2011-12-03 20:25 ` Syam Sidhardhan
2011-12-03 21:00 ` gene heskett
2011-12-04 20:55 ` Johan Hedberg
2011-12-05 15:20 ` 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=1322144076-1913-3-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;
as well as URLs for NNTP newsgroup(s).