Skip to content

Commit

Permalink
client: Invalidate scan filter on "scan" command
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jonas2515 authored and Vudentz committed Nov 13, 2023
1 parent b978f97 commit 7ef4061
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7ef4061

Please sign in to comment.