Linux bluetooth development
 help / color / mirror / Atom feed
From: Syam Sidhardhan <s.syam@samsung.com>
To: Syam Sidhardhan <s.syam@samsung.com>, linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 3/3] Send the Extended Error result code, if requested in the failure cases
Date: Thu, 24 Nov 2011 20:46:22 +0530	[thread overview]
Message-ID: <8E965D3870DC4AC1B476EF6E12DC2FE6@sisodomain.com> (raw)
In-Reply-To: 1322144076-1913-3-git-send-email-s.syam@samsung.com

Hi,

----- Original Message ----- 
From: "Syam Sidhardhan" <s.syam@samsung.com>
To: <linux-bluetooth@vger.kernel.org>
Cc: "Syam Sidhardhan" <s.syam@samsung.com>
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@vger.kernel.org
> 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.


  reply	other threads:[~2011-11-24 15:16 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 ` [PATCH 3/3] Send the Extended Error result code, if requested in the failure cases Syam Sidhardhan
2011-11-24 15:16   ` Syam Sidhardhan [this message]
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=8E965D3870DC4AC1B476EF6E12DC2FE6@sisodomain.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