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.
This commit is contained in:
Lubomir Rintel 2017-06-02 13:09:07 +02:00
parent 238efbbb12
commit 1d35fd0103

View file

@ -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;
}