From: Arran Cudbard-Bell Date: Tue, 23 Apr 2019 19:46:28 +0000 (-0400) Subject: Use rctx consistently everywhere X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fc5ee73ab7b8dd723f784abf97b63edae0abb9d;p=thirdparty%2Ffreeradius-server.git Use rctx consistently everywhere --- diff --git a/src/lib/unlang/module.h b/src/lib/unlang/module.h index 087e1d104e9..604a7d55357 100644 --- a/src/lib/unlang/module.h +++ b/src/lib/unlang/module.h @@ -118,11 +118,11 @@ rlm_rcode_t unlang_module_yield_to_subrequest(rlm_rcode_t *out, REQUEST **child, rlm_rcode_t unlang_module_yield_to_xlat(TALLOC_CTX *ctx, fr_value_box_t **out, REQUEST *request, xlat_exp_t const *xlat, fr_unlang_module_resume_t resume, - fr_unlang_module_signal_t signal, void *uctx); + fr_unlang_module_signal_t signal, void *rctx); rlm_rcode_t unlang_module_yield(REQUEST *request, fr_unlang_module_resume_t resume, - fr_unlang_module_signal_t signal, void *ctx); + fr_unlang_module_signal_t signal, void *rctx); #ifdef __cplusplus } diff --git a/src/modules/rlm_delay/rlm_delay.c b/src/modules/rlm_delay/rlm_delay.c index dfa1dc43852..0e32a0cca6b 100644 --- a/src/modules/rlm_delay/rlm_delay.c +++ b/src/modules/rlm_delay/rlm_delay.c @@ -54,12 +54,12 @@ static const CONF_PARSER module_config[] = { * @param[in] request The current request. * @param[in] instance This instance of the delay module. * @param[in] thread Thread specific module instance. - * @param[in] ctx Scheduled end of the delay. + * @param[in] rctx Scheduled end of the delay. * @param[in] fired When request processing was resumed. */ -static void _delay_done(REQUEST *request, UNUSED void *instance, UNUSED void *thread, void *ctx, struct timeval *fired) +static void _delay_done(REQUEST *request, UNUSED void *instance, UNUSED void *thread, void *rctx, struct timeval *fired) { - struct timeval *yielded = talloc_get_type_abort(ctx, struct timeval); + struct timeval *yielded = talloc_get_type_abort(rctx, struct timeval); RDEBUG2("Delay done"); @@ -114,9 +114,9 @@ static int delay_add(REQUEST *request, struct timeval *resume_at, struct timeval * */ static rlm_rcode_t mod_delay_return(REQUEST *request, - UNUSED void *instance, UNUSED void *thread, void *ctx) + UNUSED void *instance, UNUSED void *thread, void *rctx) { - struct timeval *yielded = talloc_get_type_abort(ctx, struct timeval); + struct timeval *yielded = talloc_get_type_abort(rctx, struct timeval); /* * Print how long the delay *really* was. @@ -134,14 +134,14 @@ static rlm_rcode_t mod_delay_return(REQUEST *request, return RLM_MODULE_OK; } -static void mod_delay_cancel(REQUEST *request, UNUSED void *instance, UNUSED void *thread, void *ctx, +static void mod_delay_cancel(REQUEST *request, UNUSED void *instance, UNUSED void *thread, void *rctx, fr_state_signal_t action) { if (action != FR_SIGNAL_CANCEL) return; RDEBUG2("Cancelling delay"); - if (!fr_cond_assert(unlang_module_timeout_delete(request, ctx) == 0)) return; + if (!fr_cond_assert(unlang_module_timeout_delete(request, rctx) == 0)) return; } static rlm_rcode_t CC_HINT(nonnull) mod_delay(void *instance, UNUSED void *thread, REQUEST *request) diff --git a/src/modules/rlm_rest/rlm_rest.c b/src/modules/rlm_rest/rlm_rest.c index 9cfe98b955d..d3553d2edbc 100644 --- a/src/modules/rlm_rest/rlm_rest.c +++ b/src/modules/rlm_rest/rlm_rest.c @@ -537,12 +537,12 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authorize(void *instance, void *thread, return unlang_module_yield(request, mod_authorize_result, rest_io_module_action, handle); } -static rlm_rcode_t mod_authenticate_result(REQUEST *request, void *instance, void *thread, void *ctx) +static rlm_rcode_t mod_authenticate_result(REQUEST *request, void *instance, void *thread, void *rctx) { rlm_rest_t const *inst = instance; rlm_rest_thread_t *t = thread; rlm_rest_section_t const *section = &inst->authenticate; - rlm_rest_handle_t *handle = ctx; + rlm_rest_handle_t *handle = rctx; int hcode; int rcode = RLM_MODULE_OK; @@ -666,12 +666,12 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, void *threa return unlang_module_yield(request, mod_authenticate_result, NULL, handle); } -static rlm_rcode_t mod_accounting_result(REQUEST *request, void *instance, void *thread, void *ctx) +static rlm_rcode_t mod_accounting_result(REQUEST *request, void *instance, void *thread, void *rctx) { rlm_rest_t const *inst = instance; rlm_rest_thread_t *t = thread; rlm_rest_section_t const *section = &inst->authenticate; - rlm_rest_handle_t *handle = ctx; + rlm_rest_handle_t *handle = rctx; int hcode; int rcode = RLM_MODULE_OK; @@ -745,12 +745,12 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, void *thread, return unlang_module_yield(request, mod_accounting_result, NULL, handle); } -static rlm_rcode_t mod_post_auth_result(REQUEST *request, void *instance, void *thread, void *ctx) +static rlm_rcode_t mod_post_auth_result(REQUEST *request, void *instance, void *thread, void *rctx) { rlm_rest_t const *inst = instance; rlm_rest_thread_t *t = thread; rlm_rest_section_t const *section = &inst->authenticate; - rlm_rest_handle_t *handle = ctx; + rlm_rest_handle_t *handle = rctx; int hcode; int rcode = RLM_MODULE_OK;