summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2017-06-02 13:09:07 +0200
committerLubomir Rintel <lkundrak@v3.sk>2017-06-02 20:52:16 +0200
commit1d35fd01031aeeaf54edb55771e53d8c5365ccbd (patch)
tree9f445ccfdd12f5313fa27d1b21adb2d76e59d063
parent238efbbb12d32b4d4b7827509b4f21af9d159617 (diff)
downloadNetworkManager-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.c9
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;
}