cli: initialize connection list in do_device_connect()

The connection list may be required in nmc_secrets_requested() if
secrets are needed.

Fixes: 45fc268890

https://bugzilla.gnome.org/show_bug.cgi?id=767987
This commit is contained in:
Beniamino Galvani 2016-06-24 14:06:04 +02:00
parent f2d5c8d7f8
commit bf7b9c60b6

View file

@ -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)