summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
Diffstat (limited to 'clients')
-rw-r--r--clients/cli/general.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/clients/cli/general.c b/clients/cli/general.c
index 1da3803fc9..a4face54cc 100644
--- a/clients/cli/general.c
+++ b/clients/cli/general.c
@@ -594,6 +594,7 @@ do_general (NmCli *nmc, int argc, char **argv)
/* no arguments -> get hostname */
char *hostname = NULL;
+ nmc->get_client (nmc); /* create NMClient */
g_object_get (nmc->client, NM_CLIENT_HOSTNAME, &hostname, NULL);
if (hostname)
g_print ("%s\n", hostname);
@@ -606,6 +607,7 @@ do_general (NmCli *nmc, int argc, char **argv)
g_print ("Warning: ignoring extra garbage after '%s' hostname\n", hostname);
nmc->should_wait = TRUE;
+ nmc->get_client (nmc); /* create NMClient */
nm_client_save_hostname_async (nmc->client, hostname, NULL, save_hostname_cb, nmc);
}
}