From 8c98b34228abb4dfde822ad89106b4d8b2287639 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 7 Aug 2012 22:16:03 +0200 Subject: Imported Upstream version 0.9.6.0 --- cli/src/connections.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cli/src/connections.c') diff --git a/cli/src/connections.c b/cli/src/connections.c index 8e654864..4776e1a6 100644 --- a/cli/src/connections.c +++ b/cli/src/connections.c @@ -1230,7 +1230,7 @@ find_device_for_connection (NmCli *nmc, active = nm_device_get_active_connection (*device); if (!active) { - g_set_error (error, 0, 0, _("no active connection on device '%s'"), iface); + g_set_error (error, NMCLI_ERROR, 0, _("no active connection on device '%s'"), iface); return FALSE; } *spec_object = nm_object_get_path (NM_OBJECT (active)); @@ -1238,7 +1238,7 @@ find_device_for_connection (NmCli *nmc, } else { active = get_default_active_connection (nmc, device); if (!active) { - g_set_error (error, 0, 0, _("no active connection or device")); + g_set_error_literal (error, NMCLI_ERROR, 0, _("no active connection or device")); return FALSE; } *spec_object = nm_object_get_path (NM_OBJECT (active)); @@ -1309,9 +1309,11 @@ find_device_for_connection (NmCli *nmc, return TRUE; } else { if (iface) - g_set_error (error, 0, 0, _("device '%s' not compatible with connection '%s'"), iface, nm_setting_connection_get_id (s_con)); + g_set_error (error, NMCLI_ERROR, 0, _("device '%s' not compatible with connection '%s'"), + iface, nm_setting_connection_get_id (s_con)); else - g_set_error (error, 0, 0, _("no device found for connection '%s'"), nm_setting_connection_get_id (s_con)); + g_set_error (error, NMCLI_ERROR, 0, _("no device found for connection '%s'"), + nm_setting_connection_get_id (s_con)); return FALSE; } } -- cgit 1.3.0-6-gf8a5