]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
cache request->module, as per the other uses
authorAlan T. DeKok <aland@freeradius.org>
Tue, 27 Apr 2021 11:15:54 +0000 (07:15 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 27 Apr 2021 11:15:54 +0000 (07:15 -0400)
src/lib/unlang/module.c

index d02af3a394d5e8c19ca391403db76d84fb4d1ab0..8fe00efd3cc47ed63f1067cb8a2a568a33d40910 100644 (file)
@@ -580,15 +580,19 @@ static void unlang_module_signal(request_t *request, unlang_stack_frame_t *frame
 {
        unlang_frame_state_module_t     *state = talloc_get_type_abort(frame->state, unlang_frame_state_module_t);
        unlang_module_t                 *mc = unlang_generic_to_module(frame->instruction);
+       char const                      *caller;
 
        if (!state->signal) return;
 
+       caller = request->module;
        request->module = mc->instance->name;
        state->signal(&(module_ctx_t){
                        .instance = mc->instance->dl_inst->data,
                        .thread = state->thread->data
                      },
                      request, state->rctx, action);
+       request->module = caller;
+
        /*
         *      One fewer caller for this module.  Since this module
         *      has been cancelled, decrement the active callers and