about summary refs log tree commit diff
path: root/clients/cli/connections.c
diff options
context:
space:
mode:
authorAron Xu <aron@debian.org>2016-12-20 20:07:38 +0800
committerAron Xu <aron@debian.org>2016-12-20 20:07:38 +0800
commit3bf5cabfc7d7a3c7fdb4e2bc3d771d2a07db8bc0 (patch)
tree1ac587c7e73af842b847599dc29b44430bf112ff /clients/cli/connections.c
parent1836daa45f4f0d8d0b791ed020774b915e9dd92d (diff)
parent45cb5bb3c0e6edb887cf69b417fcaf7053814a9b (diff)
Merge tag 'upstream/1.4.4'
Upstream version 1.4.4
Diffstat (limited to 'clients/cli/connections.c')
-rw-r--r--clients/cli/connections.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
index dfd619cc..36c41ace 100644
--- a/clients/cli/connections.c
+++ b/clients/cli/connections.c
@@ -2179,6 +2179,10 @@ active_connection_state_cb (NMActiveConnection *active, GParamSpec *pspec, Activ
 		g_print (_("Connection successfully activated (D-Bus active path: %s)\n"),
 		         nm_object_get_path (NM_OBJECT (active)));
 		activate_connection_info_finish (info);
+	} else if (state == NM_ACTIVE_CONNECTION_STATE_DEACTIVATED) {
+		g_string_printf (nmc->return_text, _("Error: Connection activation failed."));
+		nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION;
+		activate_connection_info_finish (info);
 	} else if (state == NM_ACTIVE_CONNECTION_STATE_ACTIVATING) {
 		/* activating master connection does not automatically activate any slaves, so their
 		 * active connection state will not progress beyond ACTIVATING state.
@@ -4149,7 +4153,8 @@ set_ip4_address (NmCli *nmc, NMConnection *con, OptionInfo *option, const char *
 		              NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_MANUAL,
 		              NULL);
 	}
-	return set_property (con, option->setting_name, option->property, value, '\0', error);
+	return set_property (con, option->setting_name, option->property, value,
+	                     option->flags & OPTION_MULTI ? '+' : '\0', error);
 }
 
 static gboolean
@@ -4168,7 +4173,8 @@ set_ip6_address (NmCli *nmc, NMConnection *con, OptionInfo *option, const char *
 		              NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_MANUAL,
 		              NULL);
 	}
-	return set_property (con, option->setting_name, option->property, value, '\0', error);
+	return set_property (con, option->setting_name, option->property, value,
+	                     option->flags & OPTION_MULTI ? '+' : '\0', error);
 }