]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Call module_thread_instance_find with the module_instance not the instance data
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 27 Nov 2016 00:12:01 +0000 (19:12 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 27 Nov 2016 00:12:01 +0000 (19:12 -0500)
src/main/unlang.c

index 3040500cc07c81e7d23280a6913e74707b53d800..19413845c6adb92d90a4a31d6f25726bd935ee04 100644 (file)
@@ -1541,12 +1541,14 @@ rlm_rcode_t unlang_yield(REQUEST *request, fr_unlang_resume_t callback,
        unlang_stack_frame_t    *frame;
        unlang_stack_t          *stack = request->stack;
        unlang_resumption_t     *mr;
+       unlang_module_call_t    *sp;
 
        rad_assert(stack->depth > 0);
 
        frame = &stack->frame[stack->depth];
 
        rad_assert(frame->instruction->type == UNLANG_TYPE_MODULE_CALL);
+       sp = unlang_generic_to_module_call(frame->instruction);
 
        mr = talloc(request, unlang_resumption_t);
        rad_assert(mr != NULL);
@@ -1556,7 +1558,7 @@ rlm_rcode_t unlang_yield(REQUEST *request, fr_unlang_resume_t callback,
        mr->module.self.type = UNLANG_TYPE_RESUME;
        mr->callback = callback;
        mr->action_callback = action_callback;
-       mr->thread = module_thread_instance_find(mr->module.module_instance->data); /* Could have caller pass this? */
+       mr->thread = module_thread_instance_find(sp->module_instance);
        mr->ctx = ctx;
 
        frame->instruction = unlang_resumption_to_generic(mr);