* [PATCH BlueZ] advertising: Treat empty LocalName the same as omitting it
@ 2022-05-06 23:08 Luiz Augusto von Dentz
2022-05-07 0:24 ` [BlueZ] " bluez.test.bot
2022-05-09 20:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2022-05-06 23:08 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This treats empty LocalName ("") the same as omitting it so not name is
set in the advertising data since some D-Bus binding seems to have
problems to omit properties at runtime.
Fixes: https://github.com/bluez/bluez/issues/337
---
src/advertising.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/advertising.c b/src/advertising.c
index 2110f17c9..ca23774ba 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -533,7 +533,15 @@ static bool parse_local_name(DBusMessageIter *iter,
dbus_message_iter_get_basic(iter, &name);
free(client->name);
- client->name = strdup(name);
+
+ /* Treat empty string the same as omitting since there is no point on
+ * adding a empty name as AD data as it just take space that could be
+ * used for something else.
+ */
+ if (name[0] != '\0')
+ client->name = strdup(name);
+ else
+ client->name = NULL;
return true;
}
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [BlueZ] advertising: Treat empty LocalName the same as omitting it 2022-05-06 23:08 [PATCH BlueZ] advertising: Treat empty LocalName the same as omitting it Luiz Augusto von Dentz @ 2022-05-07 0:24 ` bluez.test.bot 2022-05-09 20:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth 1 sibling, 0 replies; 3+ messages in thread From: bluez.test.bot @ 2022-05-07 0:24 UTC (permalink / raw) To: linux-bluetooth, luiz.dentz [-- Attachment #1: Type: text/plain, Size: 995 bytes --] This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=639269 ---Test result--- Test Summary: CheckPatch PASS 1.47 seconds GitLint PASS 1.00 seconds Prep - Setup ELL PASS 39.50 seconds Build - Prep PASS 0.67 seconds Build - Configure PASS 8.10 seconds Build - Make PASS 1368.00 seconds Make Check PASS 11.37 seconds Make Check w/Valgrind PASS 405.40 seconds Make Distcheck PASS 213.47 seconds Build w/ext ELL - Configure PASS 7.93 seconds Build w/ext ELL - Make PASS 1380.64 seconds Incremental Build with patchesPASS 0.00 seconds --- Regards, Linux Bluetooth ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] advertising: Treat empty LocalName the same as omitting it 2022-05-06 23:08 [PATCH BlueZ] advertising: Treat empty LocalName the same as omitting it Luiz Augusto von Dentz 2022-05-07 0:24 ` [BlueZ] " bluez.test.bot @ 2022-05-09 20:00 ` patchwork-bot+bluetooth 1 sibling, 0 replies; 3+ messages in thread From: patchwork-bot+bluetooth @ 2022-05-09 20:00 UTC (permalink / raw) To: Luiz Augusto von Dentz; +Cc: linux-bluetooth Hello: This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Fri, 6 May 2022 16:08:19 -0700 you wrote: > From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> > > This treats empty LocalName ("") the same as omitting it so not name is > set in the advertising data since some D-Bus binding seems to have > problems to omit properties at runtime. > > Fixes: https://github.com/bluez/bluez/issues/337 > > [...] Here is the summary with links: - [BlueZ] advertising: Treat empty LocalName the same as omitting it https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f0106d92a1e0 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-09 20:00 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-05-06 23:08 [PATCH BlueZ] advertising: Treat empty LocalName the same as omitting it Luiz Augusto von Dentz 2022-05-07 0:24 ` [BlueZ] " bluez.test.bot 2022-05-09 20:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.