From: James Prestwood <prestwoj@gmail.com>
To: Denis Kenzior <denkenz@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH 02/14] station: use network_bss_list_prune
Date: Thu, 8 Aug 2024 07:44:58 -0700 [thread overview]
Message-ID: <85e33486-824f-4fb3-b864-e9a7be40476d@gmail.com> (raw)
In-Reply-To: <fe42fb8d-b159-4988-924c-81cdfd2531df@gmail.com>
Hi Denis,
On 8/8/24 7:29 AM, Denis Kenzior wrote:
> Hi James,
>
> On 8/7/24 1:14 PM, James Prestwood wrote:
>> Use this to clear only entires that were not found in the newest
>> scan results.
>> ---
>> src/station.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/station.c b/src/station.c
>> index e373b03b..2c4d686b 100644
>> --- a/src/station.c
>> +++ b/src/station.c
>> @@ -943,7 +943,7 @@ void station_set_scan_results(struct station
>> *station,
>> l_queue_foreach_remove(new_bss_list, bss_free_if_ssid_not_utf8,
>> NULL);
>> while ((network = l_queue_pop_head(station->networks_sorted)))
>> - network_bss_list_clear(network);
>> + network_bss_list_prune(network, new_bss_list);
>
> You're sending the new list without vetting whether the SSID matches
> the network. That will likely come to haunt you later.
Yes, one of several problems with this. Its also ~O(N^2) so with v2 I'll
be using a different approach. Slightly more optimized, and fixes the
issue you mentioned.
>
>> l_queue_clear(station->hidden_bss_list_sorted, NULL);
> Regards,
> -Denis
next prev parent reply other threads:[~2024-08-08 14:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-07 18:14 [PATCH 01/14] network: add network_bss_list_prune James Prestwood
2024-08-07 18:14 ` [PATCH 02/14] station: use network_bss_list_prune James Prestwood
2024-08-08 14:29 ` Denis Kenzior
2024-08-08 14:44 ` James Prestwood [this message]
2024-08-07 18:14 ` [PATCH 03/14] network: remove network_bss_list_clear James Prestwood
2024-08-07 18:14 ` [PATCH 04/14] dbus: Add net.connman.iwd.BasicServiceSet interface James Prestwood
2024-08-07 18:14 ` [PATCH 05/14] network: implement net.connman.iwd.BasicServiceSet James Prestwood
2024-08-07 18:14 ` [PATCH 06/14] network: add BasicServiceSets property on the network object James Prestwood
2024-08-07 18:14 ` [PATCH 07/14] station: add ConnectedBss property James Prestwood
2024-08-07 18:14 ` [PATCH 08/14] doc: document BasicServiceSet API James Prestwood
2024-08-08 14:42 ` Denis Kenzior
2024-08-07 18:14 ` [PATCH 09/14] client: separate property header and values into two functions James Prestwood
2024-08-07 18:14 ` [PATCH 10/14] client: add net.connman.iwd.BasicServiceSet definition James Prestwood
2024-08-07 18:14 ` [PATCH 11/14] client: Add BasicServiceSets property to network James Prestwood
2024-08-07 18:14 ` [PATCH 12/14] client: add BasicServiceSet interface James Prestwood
2024-08-07 18:14 ` [PATCH 13/14] client: refactor cmd_connect() and add find_network() James Prestwood
2024-08-07 18:14 ` [PATCH 14/14] client: add station command "get-bsses" James Prestwood
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=85e33486-824f-4fb3-b864-e9a7be40476d@gmail.com \
--to=prestwoj@gmail.com \
--cc=denkenz@gmail.com \
--cc=iwd@lists.linux.dev \
/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