mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-05 10:20:14 +01:00
clients/secret-agent: use g_hash_table_get_keys_as_array() in nm_secret_agent_simple_enable()
This commit is contained in:
parent
d52fd81b91
commit
883978ec99
1 changed files with 5 additions and 6 deletions
|
|
@ -1090,7 +1090,8 @@ void
|
|||
nm_secret_agent_simple_enable (NMSecretAgentSimple *self, const char *path)
|
||||
{
|
||||
NMSecretAgentSimplePrivate *priv = NM_SECRET_AGENT_SIMPLE_GET_PRIVATE (self);
|
||||
GList *requests, *iter;
|
||||
gs_free RequestData **requests = NULL;
|
||||
gsize i;
|
||||
gs_free char *path_full = NULL;
|
||||
|
||||
/* The path is only used to match a request_id with the current
|
||||
|
|
@ -1109,11 +1110,9 @@ nm_secret_agent_simple_enable (NMSecretAgentSimple *self, const char *path)
|
|||
priv->enabled = TRUE;
|
||||
|
||||
/* Service pending secret requests. */
|
||||
requests = g_hash_table_get_values (priv->requests);
|
||||
for (iter = requests; iter; iter = g_list_next (iter))
|
||||
request_secrets_from_ui (iter->data);
|
||||
|
||||
g_list_free (requests);
|
||||
requests = (RequestData **) g_hash_table_get_keys_as_array (priv->requests, NULL);
|
||||
for (i = 0; requests[i]; i++)
|
||||
request_secrets_from_ui (requests[i]);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue