From bf7b9c60b6237df12897d17a2ae8921382a0773d Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Fri, 24 Jun 2016 14:06:04 +0200 Subject: [PATCH] cli: initialize connection list in do_device_connect() The connection list may be required in nmc_secrets_requested() if secrets are needed. Fixes: 45fc268890f70fec0fb66c59de388d1798837230 https://bugzilla.gnome.org/show_bug.cgi?id=767987 --- clients/cli/devices.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clients/cli/devices.c b/clients/cli/devices.c index cd4f942966..ffe7072e74 100644 --- a/clients/cli/devices.c +++ b/clients/cli/devices.c @@ -1796,6 +1796,8 @@ do_device_connect (NmCli *nmc, int argc, char **argv) nmc->nowait_flag = (nmc->timeout == 0); nmc->should_wait++; + nmc->connections = nm_client_get_connections (nmc->client); + /* Create secret agent */ nmc->secret_agent = nm_secret_agent_simple_new ("nmcli-connect"); if (nmc->secret_agent)