From: Arran Cudbard-Bell Date: Fri, 24 Nov 2017 15:18:04 +0000 (+0000) Subject: Refer to the resume ctx as rctx X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e23fcbebf650905edb0e0931fcf2bf370be69a7;p=thirdparty%2Ffreeradius-server.git Refer to the resume ctx as rctx --- diff --git a/src/include/interpreter.h b/src/include/interpreter.h index dfb2116ddcd..d55a0c15507 100644 --- a/src/include/interpreter.h +++ b/src/include/interpreter.h @@ -196,20 +196,20 @@ typedef struct { */ typedef struct { unlang_t self; - unlang_t *parent; //!< The original instruction. + unlang_t *parent; //!< The original instruction. - fr_unlang_resume_callback_t callback; //!< Function the yielding code indicated should - //!< be called when the request could be resumed. + void *callback; //!< Function the yielding code indicated should + //!< be called when the request could be resumed. - fr_unlang_action_t signal_callback; //!< Function the yielding module indicated should - //!< be called when the request is poked via an action - //!< may be removed in future. + fr_unlang_action_t signal_callback; //!< Function the yielding module indicated should + //!< be called when the request is poked via an action + //!< may be removed in future. - - void *resume_ctx; //!< Context data for the callback. Usually represents - //!< the module's internal state at the time of yielding. - void const *instance; //!< instance data - void *thread; //!< thread data + void *resume_ctx; //!< Context data for the callback. Usually represents + ///< the module's internal state at the time of + ///< stack; @@ -566,7 +566,7 @@ static unlang_resume_t *unlang_resume_alloc(REQUEST *request, */ mr->callback = callback; mr->signal_callback = signal_callback; - mr->resume_ctx = ctx; + mr->resume_ctx = rctx; /* * Replaces the current stack frame with a RESUME frame. @@ -3230,11 +3230,11 @@ int unlang_stack_depth(REQUEST *request) * @param[in] request The current request. * @param[in] callback to call on unlang_resumable(). * @param[in] signal_callback to call on unlang_action(). - * @param[in] ctx to pass to the callbacks. * @return always returns RLM_MODULE_YIELD. + * @param[in] rctx to pass to the callbacks. */ rlm_rcode_t unlang_module_yield(REQUEST *request, fr_unlang_resume_callback_t callback, - fr_unlang_action_t signal_callback, void *ctx) + fr_unlang_action_t signal_callback, void *rctx) { unlang_stack_t *stack = request->stack; unlang_stack_frame_t *frame = &stack->frame[stack->depth]; @@ -3256,7 +3256,7 @@ rlm_rcode_t unlang_module_yield(REQUEST *request, fr_unlang_resume_callback_t ca */ sp = unlang_generic_to_module_call(frame->instruction); - mr = unlang_resume_alloc(request, callback, signal_callback, ctx); + mr = unlang_resume_alloc(request, callback, signal_callback, rctx); rad_assert(mr != NULL); /* @@ -3280,7 +3280,7 @@ rlm_rcode_t unlang_module_yield(REQUEST *request, fr_unlang_resume_callback_t ca */ mr->callback = callback; mr->signal_callback = signal_callback; - mr->resume_ctx = ctx; + mr->resume_ctx = rctx; } return RLM_MODULE_YIELD;