From db6638623bb4f4b2c2b17f52362cd7a81b6f19ab Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 30 Jun 2011 16:38:32 -0500 Subject: [PATCH] core: don't schedule authentication requests twice If an error occurred, or PolicyKit is disabled, we don't want to schedule two idle handlers to return the result of an authentication request. We'll soon be queuing up multiple requests at the same time so we don't want this to happen. --- src/nm-manager-auth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nm-manager-auth.c b/src/nm-manager-auth.c index 9171663b11..6c67fb673d 100644 --- a/src/nm-manager-auth.c +++ b/src/nm-manager-auth.c @@ -309,7 +309,8 @@ auth_call_schedule_early_finish (AuthCall *call, GError *error) { if (!call->chain->error) call->chain->error = error; - call->idle_id = g_idle_add ((GSourceFunc) auth_call_complete, call); + if (!call->idle_id) + call->idle_id = g_idle_add ((GSourceFunc) auth_call_complete, call); } #if WITH_POLKIT