Re: [PATCH 3/3] Send the Extended Error result code, if requested in the failure cases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

----- Original Message ----- From: "Syam Sidhardhan" <s.syam@xxxxxxxxxxx>
To: <linux-bluetooth@xxxxxxxxxxxxxxx>
Cc: "Syam Sidhardhan" <s.syam@xxxxxxxxxxx>
Sent: Thursday, November 24, 2011 7:44 PM
Subject: [PATCH 3/3] Send the Extended Error result code, if requested in the failure cases


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

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Kindly ignore this patch. Its should be if (slc->cme_enabled). Sorry, By mistake got posted before correcting. Also I want to distinguish CME error message in the case of invalid AT commands and parse error(eg AT+CMER ).
Both case handle_event() returns -EINVAL.


Regards,
Syam.

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux