diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2014-11-26 16:24:44 +0100 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2014-12-15 15:23:49 +0100 |
commit | aad44eccd4b6525dcbddc397af25d28fb4aa470c (patch) | |
tree | cde8a7bef14a71604eeeef0ffb2c649ea57b15b9 | |
parent | 471375a3e1007f43d65149c966415d5055daf9da (diff) | |
download | NetworkManager-aad44eccd4b6525dcbddc397af25d28fb4aa470c.tar.gz |
cli: return empty secrets instead of unregistering the agent
The net effect is the same but this is a cleaner solution.
-rw-r--r-- | clients/cli/common.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/clients/cli/common.c b/clients/cli/common.c index 6b13f7f80c..141b4e76df 100644 --- a/clients/cli/common.c +++ b/clients/cli/common.c @@ -977,12 +977,9 @@ nmc_secrets_requested (NMSecretAgentSimple *agent, if (success) nm_secret_agent_simple_response (agent, request_id, secrets); else { - /* Unregister our secret agent on failure, so that another agent - * may be tried */ - if (nmc->secret_agent) { - nm_secret_agent_old_unregister (nmc->secret_agent, NULL, NULL); - g_clear_object (&nmc->secret_agent); - } + /* Return empty secrets so that another agent may be tried */ + g_ptr_array_set_size (secrets, 0); + nm_secret_agent_simple_response (agent, request_id, secrets); } } |