summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2022-05-12 12:32:50 +0200
committerLubomir Rintel <lkundrak@v3.sk>2022-05-12 12:32:50 +0200
commit5bccfef88ebce83ddb04a72e42256147dfac82d8 (patch)
tree877536baededd3c43e19089ab767a833b71b5fdf
parent94154fd8242276ee27c0075f965329f8566bdd95 (diff)
nmcli/devices: fix sorting of APslr/wep-fixes
Sort WEP access points as intended -- down, not up. Fixes: 550e3bbdd8f5 ('cli: device: color WEP APs differently in "wifi list"')
-rw-r--r--src/nmcli/devices.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nmcli/devices.c b/src/nmcli/devices.c
index 8a4e942281..6fce9de731 100644
--- a/src/nmcli/devices.c
+++ b/src/nmcli/devices.c
@@ -1238,7 +1238,7 @@ compare_aps(gconstpointer a, gconstpointer b, gpointer user_data)
NMAccessPoint *apb = *(NMAccessPoint **) b;
/* Sort the deprecated WEP connections last. */
- NM_CMP_DIRECT(_ap_is_wep(apb), _ap_is_wep(apa));
+ NM_CMP_DIRECT(_ap_is_wep(apa), _ap_is_wep(apb));
NM_CMP_DIRECT(nm_access_point_get_strength(apb), nm_access_point_get_strength(apa));
NM_CMP_DIRECT(nm_access_point_get_frequency(apa), nm_access_point_get_frequency(apb));