#18775 closed bug (fixed)

NetworkStatus: wifi network list regression

Reported by: korli Owned by: pulkomandy
Priority: blocker Milestone: R1/beta5
Component: Applications/NetworkStatus Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I updated to hrev57560. Now the wireless menu isn't listed sorted by signal strength like before.

Change History (6)

comment:1 by waddlesplash, 11 months ago

Milestone: UnscheduledR1/beta5
Owner: changed from nobody to pulkomandy
Priority: normalblocker
Status: newassigned

Presumably a regression from hrev57533.

comment:2 by madmax, 11 months ago

The compare functions for std::stable_sort and BList are different. Instead of the typical signed value to know if a is less than, equal to or greater than b, stable_sort just reads a boolean saying whether a < b. Changing CompareSignalStrength to return bStrength < aStrength (and strncasecmp < 0) seems to work, but maybe the signature should also be changed?

comment:3 by korli, 11 months ago

Indeed signature should be: bool cmp(const Type1& a, const Type2& b);

comment:4 by pulkomandy, 11 months ago

We can change it but then it isn't quite compatible with the previous API. Is that acceptable? I guess so, if the function did not yet get too much use in existing software.

comment:5 by korli, 11 months ago

Patch without signature change: https://review.haiku-os.org/c/haiku/+/7401

comment:6 by korli, 11 months ago

Resolution: fixed
Status: assignedclosed

Merged in hrev57581. Thanks Madmax for the pointer!

Note: See TracTickets for help on using tickets.