summary refs log tree commit diff
path: root/cli/src/connections.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2012-08-07 22:16:03 +0200
committerMichael Biebl <biebl@debian.org>2012-08-07 22:16:03 +0200
commit8c98b34228abb4dfde822ad89106b4d8b2287639 (patch)
tree9305205f351759c51888cd9f7d75a2eb5b0e1431 /cli/src/connections.c
parent7f1d08cf21e97f5e60d4636bb1e6c287c34ee2df (diff)
Imported Upstream version 0.9.6.0 upstream/0.9.6.0
Diffstat (limited to 'cli/src/connections.c')
-rw-r--r--cli/src/connections.c10
1 files changed, 6 insertions, 4 deletions
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;
 		}
 	}