cli: Activating an already activated connection fails

The new ActiveConnection starts in UNKNOWN state and we immediately assume
it failed. We should wait for DEACTIVATED or ACTIVATED instead.

https://bugzilla.gnome.org/show_bug.cgi?id=739339
This commit is contained in:
Lubomir Rintel 2014-10-28 11:46:23 +01:00
parent b63f8c80f8
commit 0276945fd3

View file

@ -1741,8 +1741,7 @@ active_connection_state_cb (NMActiveConnection *active, GParamSpec *pspec, gpoin
nm_object_get_path (NM_OBJECT (active)));
g_object_unref (active);
quit ();
} else if ( state == NM_ACTIVE_CONNECTION_STATE_DEACTIVATED
|| state == NM_ACTIVE_CONNECTION_STATE_UNKNOWN) {
} 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;
g_object_unref (active);