]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth-policy: Emit event when report finishes
authorAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 26 Feb 2019 09:49:46 +0000 (11:49 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 26 Feb 2019 09:49:51 +0000 (11:49 +0200)
src/auth/auth-policy.c

index 4525d3a886e47fc88f9b75b001f9014d78bf4b37..029d0011dbf7c0cecb65dc1e73556fa367d0f7c3 100644 (file)
@@ -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)