From 8baa1aca8dfd35e3190d7d5655eb83b5b901e263 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 21 Apr 2011 10:42:53 +0200 Subject: Imported Upstream version 0.8.4.0 --- cli/src/nmcli.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'cli/src/nmcli.c') diff --git a/cli/src/nmcli.c b/cli/src/nmcli.c index f51779e6..4a548024 100644 --- a/cli/src/nmcli.c +++ b/cli/src/nmcli.c @@ -33,6 +33,9 @@ #include #include #include +#include +#include +#include #include "nmcli.h" #include "utils.h" @@ -68,7 +71,6 @@ usage (const char *prog_name) " -m[ode] tabular|multiline output mode\n" " -f[ields] |all|common specify fields to output\n" " -e[scape] yes|no escape columns separators in values\n" - " -n[ocheck] don't check nmcli and NetworkManager versions\n" " -v[ersion] show program version\n" " -h[elp] print this help\n\n" "OBJECT\n" @@ -201,8 +203,6 @@ parse_command_line (NmCli *nmc, int argc, char **argv) return nmc->return_value; } nmc->required_fields = g_strdup (argv[1]); - } else if (matches (opt, "-nocheck") == 0) { - nmc->nocheck_ver = TRUE; } else if (matches (opt, "-version") == 0) { printf (_("nmcli tool, version %s\n"), NMCLI_VERSION); return NMC_RESULT_SUCCESS; @@ -275,8 +275,13 @@ nmc_init (NmCli *nmc) nmc->timeout = 10; nmc->system_settings = NULL; + nmc->user_settings = NULL; + nmc->system_settings_running = FALSE; + nmc->user_settings_running = FALSE; + nmc->system_connections = NULL; + nmc->user_connections = NULL; nmc->should_wait = FALSE; nmc->nowait_flag = TRUE; @@ -287,7 +292,6 @@ nmc_init (NmCli *nmc) nmc->required_fields = NULL; nmc->allowed_fields = NULL; memset (&nmc->print_fields, '\0', sizeof (NmcPrintFields)); - nmc->nocheck_ver = FALSE; } static void @@ -298,7 +302,10 @@ nmc_cleanup (NmCli *nmc) g_string_free (nmc->return_text, TRUE); if (nmc->system_settings) g_object_unref (nmc->system_settings); + if (nmc->user_settings) g_object_unref (nmc->user_settings); + g_slist_free (nmc->system_connections); + g_slist_free (nmc->user_connections); g_free (nmc->required_fields); if (nmc->print_fields.indices) -- cgit 1.3.0-6-gf8a5