From cca92be83c1de19458e89692a1466df971d7209a 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 (cherry picked from commit bf7b9c60b6237df12897d17a2ae8921382a0773d) --- clients/cli/devices.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clients/cli/devices.c b/clients/cli/devices.c index 65c4be7286..1e3d9e42cd 100644 --- a/clients/cli/devices.c +++ b/clients/cli/devices.c @@ -1716,6 +1716,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)