request->delayed_failure = TRUE;
handler->refcount++;
- auth_penalty_update(auth_penalty, request,
- request->last_penalty + 1);
+ if (auth_penalty != NULL) {
+ auth_penalty_update(auth_penalty, request,
+ request->last_penalty + 1);
+ }
auth_request_refresh_last_access(request);
aqueue_append(auth_failures, &request);
case AUTH_CLIENT_RESULT_SUCCESS:
auth_request_proxy_finish(request, TRUE);
- if (request->last_penalty != 0) {
+ if (request->last_penalty != 0 && auth_penalty != NULL) {
/* reset penalty */
auth_penalty_update(auth_penalty, request, 0);
}
handler->refcount++;
/* before we start authenticating, see if we need to wait first */
- auth_penalty_lookup(auth_penalty, request,
- auth_penalty_callback);
+ auth_penalty_lookup(auth_penalty, request, auth_penalty_callback);
return TRUE;
}
static void main_deinit(void)
{
+ /* cancel all pending anvil penalty lookups */
+ auth_penalty_deinit(&auth_penalty);
/* deinit auth workers, which aborts pending requests */
auth_worker_server_deinit();
/* deinit passdbs and userdbs. it aborts any pending async requests. */
mech_register_deinit(&mech_reg);
mech_deinit(global_auth_settings);
- auth_penalty_deinit(&auth_penalty);
/* allow modules to unregister their dbs/drivers/etc. before freeing
the whole data structures containing them. */