diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2017-06-02 13:09:07 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2017-06-02 20:52:16 +0200 |
commit | 1d35fd01031aeeaf54edb55771e53d8c5365ccbd (patch) | |
tree | 9f445ccfdd12f5313fa27d1b21adb2d76e59d063 | |
parent | 238efbbb12d32b4d4b7827509b4f21af9d159617 (diff) | |
download | NetworkManager-1d35fd01031aeeaf54edb55771e53d8c5365ccbd.tar.gz |
clients: respond to the secret requests that we can't service
Otherwise the daemon would hang waiting for us while we respond with awkward
silence. That is not a healthy kind of communication.
-rw-r--r-- | clients/common/nm-secret-agent-simple.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clients/common/nm-secret-agent-simple.c b/clients/common/nm-secret-agent-simple.c index 89cf156bda..97bbf0d02a 100644 --- a/clients/common/nm-secret-agent-simple.c +++ b/clients/common/nm-secret-agent-simple.c @@ -576,6 +576,15 @@ request_secrets_from_ui (NMSecretAgentSimpleRequest *request) ok = FALSE; if (!ok) { + gs_free_error GError *error = NULL; + + error = g_error_new (NM_SECRET_AGENT_ERROR, NM_SECRET_AGENT_ERROR_FAILED, + "Cannot service a secrets request %s for a %s connection", + request->request_id, + nm_connection_get_connection_type (request->connection)); + request->callback (NM_SECRET_AGENT_OLD (request->self), request->connection, + NULL, error, request->callback_data); + g_hash_table_remove (priv->requests, request->request_id); g_ptr_array_unref (secrets); return; } |