diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2014-11-13 20:22:04 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2014-11-14 14:04:35 +0100 |
commit | fa1233344ec32a5b7fc51fa506e44b8599fba2bc (patch) | |
tree | 13764964f6b3448d7015e2b15071226de780784e | |
parent | cc6f5ac4cc1bd34f413daa49788f954c51938aa0 (diff) | |
download | NetworkManager-lr/nm-1-0-integration.tar.gz |
cli: Only construct an agent for a connection if there is a connectionlr/nm-1-0-integration
[lkundrak@fedora20-2 ~]$ nmcli --ask c ifname wlan0
(process:18405): libnm-CRITICAL **: nm_object_get_path: assertion 'NM_IS_OBJECT (object)' failed
Error: Connection activation failed: The device has no connections available.
[lkundrak@fedora20-2 ~]$
-rw-r--r-- | clients/cli/connections.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 373f5719e0..7865121a9c 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -2157,7 +2157,8 @@ nmc_activate_connection (NmCli *nmc, nmc->pwds_hash = pwds_hash; /* Create secret agent */ - nmc->secret_agent = nm_secret_agent_simple_new ("nmcli-connect", nm_object_get_path (NM_OBJECT (connection))); + nmc->secret_agent = nm_secret_agent_simple_new ("nmcli-connect", + connection ? nm_object_get_path (NM_OBJECT (connection)) : NULL); if (nmc->secret_agent) g_signal_connect (nmc->secret_agent, "request-secrets", G_CALLBACK (secrets_requested), nmc); |