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.
This commit is contained in:
Dan Williams
2011-06-30 16:38:32 -05:00
parent 220fb52621
commit db6638623b

View File

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