diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2018-11-09 16:46:13 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2018-11-09 17:52:26 +0100 |
commit | 4466edcffaa7a5d8ff5c54a81bdf29e0e5d71f20 (patch) | |
tree | dcb47f8cbca5829162cb39941f7ba79cf4b07c15 /clients/cli/connections.c | |
parent | 53d9c3d661b47b69f854ab1238a9c60c9a964d42 (diff) | |
download | NetworkManager-lr/ac-sort.tar.gz |
cli/connections: improve sort by active connectionslr/ac-sort
When sorting the active connections, use the same policy as "nmcli" and
"nmcli d", not just the connection state. It looks better that way.
Diffstat (limited to 'clients/cli/connections.c')
-rw-r--r-- | clients/cli/connections.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c index c08acad5d2..b645a774fa 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -1693,12 +1693,10 @@ con_show_get_items_cmp (gconstpointer pa, gconstpointer pb, gpointer user_data) switch (item) { case NMC_SORT_ACTIVE: - NM_CMP_DIRECT (active_connection_get_state_ord (ac_b), - active_connection_get_state_ord (ac_a)); + NM_CMP_RETURN (nmc_active_connection_cmp (ac_b, ac_a)); break; case NMC_SORT_ACTIVE_INV: - NM_CMP_DIRECT (active_connection_get_state_ord (ac_a), - active_connection_get_state_ord (ac_b)); + NM_CMP_RETURN (nmc_active_connection_cmp (ac_a, ac_b)); break; case NMC_SORT_TYPE: |