From 800bd1aa18bc4a45333540f0c5d78eefe7283f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Mon, 14 Dec 2015 16:04:49 +0100 Subject: [PATCH] cli: primary connection is not NMConnection, but NMActiveConnection And use nm_client_get_primary_connection() accessor function instead of reading NM_CLIENT_PRIMARY_CONNECTION property directly. (process:31760): libnm-CRITICAL **: nm_connection_get_id: assertion 'NM_IS_CONNECTION (connection)' failed (process:31760): libnm-CRITICAL **: nm_connection_get_uuid: assertion 'NM_IS_CONNECTION (connection)' failed Fixes: d03f347b9dbdadb10952fb2704436b4405d38ac3 --- clients/cli/general.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clients/cli/general.c b/clients/cli/general.c index b49b242d9a..d8f9f8f877 100644 --- a/clients/cli/general.c +++ b/clients/cli/general.c @@ -913,14 +913,14 @@ client_hostname (NMClient *client, GParamSpec *param, NmCli *nmc) static void client_primary_connection (NMClient *client, GParamSpec *param, NmCli *nmc) { - NMConnection *primary; + NMActiveConnection *primary; const char *id; - g_object_get (client, NM_CLIENT_PRIMARY_CONNECTION, &primary, NULL); + primary = nm_client_get_primary_connection (client); if (primary) { - id = nm_connection_get_id (primary); + id = nm_active_connection_get_id (primary); if (!id) - id = nm_connection_get_uuid (primary); + id = nm_active_connection_get_uuid (primary); g_print (_("'%s' is now the primary connection\n"), id); } else {