]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Use rctx consistently everywhere
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 23 Apr 2019 19:46:28 +0000 (15:46 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 23 Apr 2019 19:47:54 +0000 (15:47 -0400)
src/lib/unlang/module.h
src/modules/rlm_delay/rlm_delay.c
src/modules/rlm_rest/rlm_rest.c

index 087e1d104e97aa6f9b188d4348b585cfa0eb09e5..604a7d55357d455cdfe363401b62502478d9c53f 100644 (file)
@@ -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
 }
index dfa1dc4385298f079cd4120e8fc975cb94b654a6..0e32a0cca6bb92ce18d7372519e6d26e9c6c6424 100644 (file)
@@ -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)
index 9cfe98b955d1971574f80d679be0c6f49a02891f..d3553d2edbc677cba704fa248f824b5bfaf221ee 100644 (file)
@@ -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;