cli: fix quitting nmcli on 'nmcli con up'

We should also quit on 'DEACTIVATED' state' when monitoring active connection
state.

Reproducer:
nmcli con add con-name myvlan dev eth1 id 88
nmcli -p con up myvlan
This commit is contained in:
Jiří Klimeš 2013-07-02 14:39:58 +02:00
parent 3eac01256c
commit f8c8d67e93

View file

@ -1282,7 +1282,8 @@ active_connection_state_cb (NMActiveConnection *active, GParamSpec *pspec, gpoin
nm_object_get_path (NM_OBJECT (active)));
}
quit ();
} else if (state == NM_ACTIVE_CONNECTION_STATE_UNKNOWN) {
} else if ( state == NM_ACTIVE_CONNECTION_STATE_DEACTIVATED
|| state == NM_ACTIVE_CONNECTION_STATE_UNKNOWN) {
g_string_printf (nmc->return_text, _("Error: Connection activation failed."));
nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION;
quit ();