From: Arran Cudbard-Bell Date: Fri, 24 Nov 2017 14:54:56 +0000 (+0000) Subject: Reorder the arguments to async functions and remove uctx X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=000f30456f30098fd0d3f9486dc336ea49cfc758;p=thirdparty%2Ffreeradius-server.git Reorder the arguments to async functions and remove uctx If it's really needed then that xlat function can store it in its own instance --- diff --git a/src/include/xlat.h b/src/include/xlat.h index e73129ac876..e311a8377aa 100644 --- a/src/include/xlat.h +++ b/src/include/xlat.h @@ -72,11 +72,10 @@ typedef ssize_t (*xlat_func_sync_t)(TALLOC_CTX *ctx, char **out, size_t outlen, * * @param[in] ctx to allocate any fr_value_box_t in. * @param[out] out Where to append #fr_value_box_t containing the output of this function. + * @param[in] request The current request. * @param[in] xlat_inst Global xlat instance. * @param[in] xlat_thread_inst Thread specific xlat instance. - * @param[in] request The current request. * @param[in] in Input arguments. - * @param[in] uctx passed to registration function. * @return * - XLAT_ACTION_YIELD xlat function is waiting on an I/O event and * has pushed a resumption function onto the stack. @@ -85,9 +84,8 @@ typedef ssize_t (*xlat_func_sync_t)(TALLOC_CTX *ctx, char **out, size_t outlen, * - XLAT_ACTION_FAIL the xlat function failed. */ typedef xlat_action_t (*xlat_func_async_t)(TALLOC_CTX *ctx, fr_cursor_t *out, - void const *xlat_inst, void *xlat_thread_inst, - REQUEST *request, fr_value_box_t const *in, - void *uctx); + REQUEST *request, void const *xlat_inst, void *xlat_thread_inst, + fr_cursor_t const *in); /** Allocate new instance data for an xlat instance * diff --git a/src/main/xlat_eval.c b/src/main/xlat_eval.c index 0137645d463..6f53e7f6d1b 100644 --- a/src/main/xlat_eval.c +++ b/src/main/xlat_eval.c @@ -568,7 +568,7 @@ xlat_action_t xlat_frame_eval_repeat(TALLOC_CTX *ctx, fr_cursor_t *out, xlat_action_t action; /* Fixme - Pass in instance and thread instance */ - action = node->xlat->func.async(ctx, out, NULL, NULL, request, result, node->xlat->uctx); + action = node->xlat->func.async(ctx, out, request, NULL, NULL, result); switch (action) { case XLAT_ACTION_PUSH_CHILD: case XLAT_ACTION_YIELD: