From: Szymon Janc <szymon.janc@gmail.com>
To: Szymon Janc <szymon.janc@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/2] android/bluetooth: Don't set remote name to empty string
Date: Mon, 24 Feb 2014 20:36:59 +0100 [thread overview]
Message-ID: <4249709.pHZtlBX2r2@athlon> (raw)
In-Reply-To: <1393001393-1160-1-git-send-email-szymon.janc@tieto.com>
On Friday 21 February 2014 17:49:52 Szymon Janc wrote:
> If remote device has name but it is empty (0 bytes) just ignore it and
> continue using address as name. This will avoid sending remote device
> property notification with empty name.
> ---
> android/bluetooth.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/android/bluetooth.c b/android/bluetooth.c
> index 31092e3..e225264 100644
> --- a/android/bluetooth.c
> +++ b/android/bluetooth.c
> @@ -1096,7 +1096,7 @@ static void update_new_device(struct device *dev,
> int8_t rssi, ev->num_props++;
> }
>
> - if (eir->name) {
> + if (eir->name && strlen(eir->name)) {
> g_free(dev->name);
> dev->name = g_strdup(eir->name);
> size += fill_hal_prop(buf + size, HAL_PROP_DEVICE_NAME,
> @@ -1136,7 +1136,7 @@ static void update_device(struct device *dev, int8_t
> rssi, ev->num_props++;
> }
>
> - if (eir->name && strcmp(dev->name, eir->name)) {
> + if (eir->name && strlen(eir->name) && strcmp(dev->name, eir->name)) {
> g_free(dev->name);
> dev->name = g_strdup(eir->name);
> size += fill_hal_prop(buf + size, HAL_PROP_DEVICE_NAME,
Both patches are now pushed upstream.
--
Szymon K. Janc
szymon.janc@gmail.com
prev parent reply other threads:[~2014-02-24 19:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 16:49 [PATCH 1/2] android/bluetooth: Don't set remote name to empty string Szymon Janc
2014-02-21 16:49 ` [PATCH 2/2] android/hal-ipc: Fix race condition when closing IPC Szymon Janc
2014-02-24 19:36 ` 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=4249709.pHZtlBX2r2@athlon \
--to=szymon.janc@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=szymon.janc@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