]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Reorder the arguments to async functions and remove uctx
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 24 Nov 2017 14:54:56 +0000 (14:54 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 24 Nov 2017 15:19:13 +0000 (15:19 +0000)
If it's really needed then that xlat function can store it in its own instance

src/include/xlat.h
src/main/xlat_eval.c

index e73129ac876947b461810c2a92c960987d6d30be..e311a8377aa0f5b5d63d5224b51d21734695bc62 100644 (file)
@@ -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
  *
index 0137645d4635ecca53720ff6f1269008326a2ea2..6f53e7f6d1b40124157fa03148de9e8881e75147 100644 (file)
@@ -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: