From: Szymon Janc <szymon.janc@tieto.com>
To: Marcin Kraglak <marcin.kraglak@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 3/4] android/gatt: Format string with address properly
Date: Fri, 11 Apr 2014 15:56:50 +0200 [thread overview]
Message-ID: <1693269.AqOluWevxW@uw000953> (raw)
In-Reply-To: <1397155238-8578-3-git-send-email-marcin.kraglak@tieto.com>
Hi Marcin,
On Thursday 10 of April 2014 20:40:37 Marcin Kraglak wrote:
> ---
> android/gatt.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/android/gatt.c b/android/gatt.c
> index 857ffe0..b246137 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -1150,12 +1150,14 @@ static void handle_client_disconnect(const void *buf, uint16_t len)
> {
> const struct hal_cmd_gatt_client_disconnect *cmd = buf;
> struct gatt_device *dev;
> + bdaddr_t bdaddr;
> uint8_t status;
> char addr[18];
>
> DBG("");
>
> - ba2str((bdaddr_t *)&cmd->bdaddr, addr);
> + android2bdaddr(cmd->bdaddr, &bdaddr);
> + ba2str(&bdaddr, addr);
>
> dev = find_device_by_conn_id(cmd->conn_id);
> if (!dev) {
>
I've pushed this patch but should we do at least sanity check on passed
device address in this command ie. check if connection id and address match?
--
Best regards,
Szymon Janc
next prev parent reply other threads:[~2014-04-11 13:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 18:40 [PATCH 1/4] android/gatt: Remove unneeded label from unregister_client Marcin Kraglak
2014-04-10 18:40 ` [PATCH 2/4] android/gatt: Simplify removing device from list Marcin Kraglak
2014-04-10 18:40 ` [PATCH 3/4] android/gatt: Format string with address properly Marcin Kraglak
2014-04-11 13:56 ` Szymon Janc [this message]
2014-04-10 18:40 ` [PATCH 4/4] android/gatt: Remove double variable check Marcin Kraglak
2014-04-11 13:54 ` [PATCH 1/4] android/gatt: Remove unneeded label from unregister_client Szymon Janc
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=1693269.AqOluWevxW@uw000953 \
--to=szymon.janc@tieto.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcin.kraglak@tieto.com \
/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