From: Aki Tuomi Date: Tue, 26 Feb 2019 09:49:46 +0000 (+0200) Subject: auth-policy: Emit event when report finishes X-Git-Tag: 2.3.9~755 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f13b11a01d10eecb582c3887f34bdb0437225b03;p=thirdparty%2Fdovecot%2Fcore.git auth-policy: Emit event when report finishes --- diff --git a/src/auth/auth-policy.c b/src/auth/auth-policy.c index 4525d3a886..029d0011db 100644 --- a/src/auth/auth-policy.c +++ b/src/auth/auth-policy.c @@ -242,12 +242,14 @@ static void auth_policy_log_result(struct policy_lookup_ctx *context) { const char *action; - if (!context->expect_result) + struct event_passthrough *e = event_create_passthrough(context->event)-> + set_name("auth_policy_request_finished"); + if (!context->expect_result) { + e_debug(e->event(), "Policy report action finished"); return; + } int result = context->result; - struct event_passthrough *e = event_create_passthrough(context->event)-> - set_name("auth_policy_request_finished")-> - add_int("policy_response", context->result); + e->add_int("policy_response", context->result); if (result < 0) action = "drop connection"; else if (context->result == 0)