about summary refs log tree commit diff
path: root/src/nmcli/devices.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2022-05-26 22:00:52 +0200
committerMichael Biebl <biebl@debian.org>2022-05-26 22:00:52 +0200
commited3fbd48dfdf52a008aa4e281b3ab3a8c08c4900 (patch)
tree751dbc6a721e96f7af9f689e443a7061ad06f3a8 /src/nmcli/devices.c
parent34881d66ffb4eaa113e318a7bc09f7ba3c7e4aec (diff)
parentb3b81846241e51b3e2bfb34c1b5af385cdcdf894 (diff)
Merge branch 'debian/master' into debian/bullseye-backports
Diffstat (limited to 'src/nmcli/devices.c')
-rw-r--r--src/nmcli/devices.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nmcli/devices.c b/src/nmcli/devices.c
index 2bfc4cec..6fce9de7 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));
@@ -2127,6 +2127,7 @@ add_and_activate_cb(GObject *client, GAsyncResult *result, gpointer user_data)
     NmCli                                                 *nmc    = info->nmc;
     gs_unref_object NMActiveConnection                    *active = NULL;
     gs_free_error GError                                  *error  = NULL;
+    const char                                            *deprecated;
 
     if (info->create)
         active = nm_client_add_and_activate_connection_finish(NM_CLIENT(client), result, &error);
@@ -2152,6 +2153,11 @@ add_and_activate_cb(GObject *client, GAsyncResult *result, gpointer user_data)
         return;
     }
 
+    deprecated =
+        nmc_connection_check_deprecated(NM_CONNECTION(nm_active_connection_get_connection(active)));
+    if (deprecated)
+        g_printerr(_("Warning: %s.\n"), deprecated);
+
     if (nmc->nowait_flag) {
         quit();
         return;