diff mbox series

[BlueZ] client: Invalidate scan filter on "scan" command

Message ID 20231108161949.11276-1-verdre@v0yd.nl
State New
Headers show
Series [BlueZ] client: Invalidate scan filter on "scan" command | expand

Commit Message

Jonas Dreßler Nov. 8, 2023, 4:19 p.m. UTC
The "scan bredr" and "scan le" commands are broken right now because the
transport filter gets set, but not actually invalidated.

Invalidate the filter with `filter.set = false` so that it actually gets
updated when set_discovery_filter() is called afterwards.
---
 client/main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com Nov. 8, 2023, 5:28 p.m. UTC | #1
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=799718

---Test result---

Test Summary:
CheckPatch                    PASS      0.64 seconds
GitLint                       PASS      0.30 seconds
BuildEll                      PASS      24.31 seconds
BluezMake                     PASS      562.65 seconds
MakeCheck                     PASS      10.60 seconds
MakeDistcheck                 PASS      149.28 seconds
CheckValgrind                 PASS      208.63 seconds
CheckSmatch                   PASS      312.79 seconds
bluezmakeextell               PASS      95.60 seconds
IncrementalBuild              PASS      509.70 seconds
ScanBuild                     PASS      922.37 seconds



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Nov. 13, 2023, 7:22 p.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed,  8 Nov 2023 17:19:49 +0100 you wrote:
> The "scan bredr" and "scan le" commands are broken right now because the
> transport filter gets set, but not actually invalidated.
> 
> Invalidate the filter with `filter.set = false` so that it actually gets
> updated when set_discovery_filter() is called afterwards.
> ---
>  client/main.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

Here is the summary with links:
  - [BlueZ] client: Invalidate scan filter on "scan" command
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=7ef40617a049

You are awesome, thank you!
diff mbox series

Patch

diff --git a/client/main.c b/client/main.c
index 88b5d5d0c..51d08a67a 100644
--- a/client/main.c
+++ b/client/main.c
@@ -1325,9 +1325,14 @@  static void cmd_scan(int argc, char *argv[])
 		return bt_shell_noninteractive_quit(EXIT_FAILURE);
 
 	if (enable == TRUE) {
-		if (strcmp(mode, "")) {
+		if (!g_strcmp0(mode, "")) {
+			g_free(filter.transport);
+			filter.transport = NULL;
+			filter.set = false;
+		} else {
 			g_free(filter.transport);
 			filter.transport = g_strdup(mode);
+			filter.set = false;
 		}
 
 		set_discovery_filter(false);