agent-manager: don't try to cancel requests that already finished

Fixes: 5d1cac81a0
(cherry picked from commit f558502278)
This commit is contained in:
Lubomir Rintel 2015-11-04 14:28:01 +01:00
parent 302914c010
commit 8c8e88ae28

View file

@ -816,8 +816,10 @@ get_done_cb (NMSecretAgent *agent,
req_complete_error (parent, error);
g_error_free (error);
} else {
/* Tell the failed agent we're no longer interested. */
nm_secret_agent_cancel_secrets (parent->current, parent->current_call_id);
if (parent->current_call_id) {
/* Tell the failed agent we're no longer interested. */
nm_secret_agent_cancel_secrets (parent->current, parent->current_call_id);
}
/* Try the next agent */
request_next_agent (parent);