From: Szymon Janc <szymon.janc@tieto.com>
To: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] android/handsfree: Refactor handle_dial()
Date: Fri, 29 Aug 2014 15:58:51 +0200 [thread overview]
Message-ID: <3335162.mhnMEypyip@uw000953> (raw)
In-Reply-To: <1409060601-14384-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
Hi Andrei,
On Tuesday 26 of August 2014 16:43:21 Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> Call callback only once.
> ---
> android/hal-handsfree.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/android/hal-handsfree.c b/android/hal-handsfree.c
> index 0f5e1d7..986e745 100644
> --- a/android/hal-handsfree.c
> +++ b/android/hal-handsfree.c
> @@ -86,6 +86,7 @@ static void handle_dial(void *buf, uint16_t len, int fd)
> {
> struct hal_ev_handsfree_dial *ev = buf;
> uint16_t num_len = ev->number_len;
> + char *number = NULL;
>
> if (len != sizeof(*ev) + num_len ||
> (num_len != 0 && ev->number[num_len - 1] != '\0')) {
> @@ -97,9 +98,9 @@ static void handle_dial(void *buf, uint16_t len, int fd)
> return;
>
> if (ev->number_len)
> - cbs->dial_call_cmd_cb((char *) ev->number);
> - else
> - cbs->dial_call_cmd_cb(NULL);
> + number = (char *) ev->number;
> +
> + cbs->dial_call_cmd_cb(number);
> }
>
> static void handle_dtmf(void *buf, uint16_t len, int fd)
Patch applied. Thanks.
--
Best regards,
Szymon Janc
prev parent reply other threads:[~2014-08-29 13:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 13:43 [PATCH] android/handsfree: Refactor handle_dial() Andrei Emeltchenko
2014-08-29 13:58 ` Szymon Janc [this message]
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=3335162.mhnMEypyip@uw000953 \
--to=szymon.janc@tieto.com \
--cc=Andrei.Emeltchenko.news@gmail.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).