Message ID | 20240419144117.1554291-1-luiz.dentz@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 4dea3fb932f815b0b1be470cc0aaa213d82bf213 |
Headers | show |
Series | [BlueZ,v1] client/advertising: Add flag to mark if data is valid | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/BuildEll | success | Build ELL PASS |
tedd_an/BluezMake | success | Bluez Make PASS |
tedd_an/MakeCheck | success | Bluez Make Check PASS |
tedd_an/MakeDistcheck | success | Make Distcheck PASS |
tedd_an/CheckValgrind | success | Check Valgrind PASS |
tedd_an/CheckSmatch | success | CheckSparse PASS |
tedd_an/bluezmakeextell | success | Make External ELL PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
tedd_an/ScanBuild | success | Scan Build PASS |
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=846157 ---Test result--- Test Summary: CheckPatch PASS 0.44 seconds GitLint PASS 0.30 seconds BuildEll PASS 24.11 seconds BluezMake PASS 1686.86 seconds MakeCheck PASS 12.95 seconds MakeDistcheck PASS 176.22 seconds CheckValgrind PASS 244.11 seconds CheckSmatch PASS 347.02 seconds bluezmakeextell PASS 117.86 seconds IncrementalBuild PASS 1476.99 seconds ScanBuild PASS 993.47 seconds --- Regards, Linux Bluetooth
Hello: This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Fri, 19 Apr 2024 10:41:17 -0400 you wrote: > From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> > > This allows the use of type 0x00 which otherwise could not be selected > since the property would not be exposed even though the data could be > set. > --- > client/advertising.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) Here is the summary with links: - [BlueZ,v1] client/advertising: Add flag to mark if data is valid https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=4dea3fb932f8 You are awesome, thank you!
diff --git a/client/advertising.c b/client/advertising.c index a7474d6a2984..a9b865a65e37 100644 --- a/client/advertising.c +++ b/client/advertising.c @@ -43,6 +43,7 @@ struct manufacturer_data { }; struct data { + bool valid; uint8_t type; struct ad_data data; }; @@ -157,7 +158,7 @@ static void print_ad(void) ad.manufacturer.data.len); } - if (ad.data.data.len) { + if (ad.data.valid) { bt_shell_printf("Data Type: 0x%02x\n", ad.data.type); bt_shell_hexdump(ad.data.data.data, ad.data.data.len); } @@ -395,7 +396,7 @@ static gboolean get_timeout(const GDBusPropertyTable *property, static gboolean data_exists(const GDBusPropertyTable *property, void *data) { - return ad.data.type != 0; + return ad.data.valid; } static gboolean get_data(const GDBusPropertyTable *property, @@ -757,7 +758,7 @@ void ad_disable_manufacturer(DBusConnection *conn) static void ad_clear_data(void) { - memset(&ad.manufacturer, 0, sizeof(ad.manufacturer)); + memset(&ad.data, 0, sizeof(ad.data)); return bt_shell_noninteractive_quit(EXIT_SUCCESS); } @@ -787,6 +788,7 @@ void ad_advertise_data(DBusConnection *conn, int argc, char *argv[]) return bt_shell_noninteractive_quit(EXIT_FAILURE); ad_clear_data(); + ad.data.valid = true; ad.data.type = val; ad.data.data = data;
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> This allows the use of type 0x00 which otherwise could not be selected since the property would not be exposed even though the data could be set. --- client/advertising.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)