diff options
| author | Michael Biebl <biebl@debian.org> | 2016-05-11 17:09:14 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2016-05-11 17:09:14 +0200 |
| commit | c74718aa5a356199a1ff957b2579153d54be9dd5 (patch) | |
| tree | cf3ade8c1e7322792ec140f09ee5e083382c5c48 /clients/cli/connections.c | |
| parent | 6bb523977deede318916fe01c78f776d215cebff (diff) | |
| parent | 73e152af6e3fb4f5848bfb8394484026ff119003 (diff) | |
Merge tag 'upstream/1.2.2'
Upstream version 1.2.2
Diffstat (limited to 'clients/cli/connections.c')
| -rw-r--r-- | clients/cli/connections.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 3fca37f5..1f1dae59 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -261,9 +261,6 @@ typedef struct { } TabCompletionInfo; static TabCompletionInfo nmc_tab_completion = {NULL, NULL, NULL, NULL}; -/* Global variable defined in nmcli.c - used for TAB completion */ -extern NmCli nm_cli; - static char *gen_connection_types (const char *text, int state); static void @@ -1970,12 +1967,19 @@ device_state_cb (NMDevice *device, GParamSpec *pspec, gpointer user_data) nm_object_get_path (NM_OBJECT (active))); quit (); } else if ( ac_state == NM_ACTIVE_CONNECTION_STATE_ACTIVATING - && state >= NM_DEVICE_STATE_IP_CONFIG) { + && state >= NM_DEVICE_STATE_IP_CONFIG + && state <= NM_DEVICE_STATE_ACTIVATED) { if (nmc->print_output == NMC_PRINT_PRETTY) nmc_terminal_erase_line (); g_print (_("Connection successfully activated (master waiting for slaves) (D-Bus active path: %s)\n"), nm_object_get_path (NM_OBJECT (active))); quit (); + } else if ( ac_state == NM_ACTIVE_CONNECTION_STATE_ACTIVATING + && state == NM_DEVICE_STATE_FAILED) { + if (nmc->print_output == NMC_PRINT_PRETTY) + nmc_terminal_erase_line (); + g_print (_("Error: Connection activation failed.")); + quit (); } else if (active && ac_state != NM_ACTIVE_CONNECTION_STATE_ACTIVATING) { g_string_printf (nmc->return_text, _("Error: Connection activation failed.")); nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION; @@ -11051,9 +11055,6 @@ do_connections (NmCli *nmc, int argc, char **argv) nmc->return_value = NMC_RESULT_ERROR_NM_NOT_RUNNING; return nmc->return_value; } - /* Compare NM and nmcli versions */ - if (!nmc_versions_match (nmc)) - return nmc->return_value; /* Get the connection list */ nmc->connections = nm_client_get_connections (nmc->client); |