*/
curl_multi_remove_handle(mandle, candle);
- unlang_interpret_mark_resumable(request);
+ unlang_interpret_mark_runnable(request);
}
break;
*
* @param[in] request The current request.
*/
-void unlang_interpret_mark_resumable(request_t *request)
+void unlang_interpret_mark_runnable(request_t *request)
{
unlang_stack_t *stack = request->stack;
unlang_stack_frame_t *frame = &stack->frame[stack->depth];
void *unlang_interpret_stack_alloc(TALLOC_CTX *ctx);
-void unlang_interpret_mark_resumable(request_t *request);
+void unlang_interpret_mark_runnable(request_t *request);
bool unlang_interpret_is_resumable(request_t *request);
#include <freeradius-devel/io/listen.h>
#include "unlang_priv.h"
-/** Run the interpreter after creating a subrequest.
- *
- * Just run some "unlang", but don't do anything else.
- *
- * This is a shim function added to 'fake' requests by the subrequest and parallel keywords.
- */
-unlang_action_t unlang_io_process_interpret(rlm_rcode_t *p_result, UNUSED module_ctx_t const *mctx, request_t *request)
-{
- rlm_rcode_t rcode;
-
- REQUEST_VERIFY(request);
-
- rcode = unlang_interpret(request);
-
- /*
- * We've yielded, and can keep running. Do so.
- */
- if ((rcode == RLM_MODULE_YIELD) &&
- (request->master_state != REQUEST_STOP_PROCESSING)) {
- *p_result = RLM_MODULE_YIELD;
- return UNLANG_ACTION_YIELD;
- }
-
- /*
- * Don't bother setting request->reply->code.
- */
- RETURN_MODULE_HANDLED;
-}
-
/** Allocate a child request based on the parent.
*
* @param[in] parent spawning the child request.
* Used when a module needs wait for an event. Typically the callback is set, and then the
* module returns unlang_module_yield().
*
- * @note The callback is automatically removed on unlang_interpret_mark_resumable().
+ * @note The callback is automatically removed on unlang_interpret_mark_runnable().
*
* param[in] request the current request.
* param[in] callback to call.
* Used when a module needs to read from an FD. Typically the callback is set, and then the
* module returns unlang_module_yield().
*
- * @note The callback is automatically removed on unlang_interpret_mark_resumable().
+ * @note The callback is automatically removed on unlang_interpret_mark_runnable().
*
* @param[in] request The current request.
* @param[in] read callback. Used for receiving and demuxing/decoding data.
* A common pattern is to use ``return unlang_module_yield(...)``.
*
* @param[in] request The current request.
- * @param[in] resume Called on unlang_interpret_mark_resumable().
+ * @param[in] resume Called on unlang_interpret_mark_runnable().
* @param[in] signal Called on unlang_action().
* @param[in] rctx to pass to the callbacks.
* @return
* Used when a module needs wait for an event.
* Typically the callback is set, and then the module returns unlang_module_yield().
*
- * @note The callback is automatically removed on unlang_interpret_mark_resumable(), i.e. if an event
+ * @note The callback is automatically removed on unlang_interpret_mark_runnable(), i.e. if an event
* on a registered FD occurs before the timeout event fires.
*
* @param[in] mctx calling context for the module.
* Used when a module needs to read from an FD. Typically the callback is set, and then the
* module returns unlang_module_yield().
*
- * @note The callback is automatically removed on unlang_interpret_mark_resumable(), so
+ * @note The callback is automatically removed on unlang_interpret_mark_runnable(), so
*
* @param[in] mctx calling context for the module.
* Contains global, thread-specific, and call-specific data for a module.
* A module may call unlang_yeild(), but still need to do something on FR_SIGNAL_DUP. If so, it's
* set here.
*
- * @note The callback is automatically removed on unlang_interpret_mark_resumable().
+ * @note The callback is automatically removed on unlang_interpret_mark_runnable().
*
* @param[in] mctx calling context for the module.
* Contains global, thread-specific, and call-specific data for a module.
*/
if (state->num_complete == state->num_children) {
RDEBUG3("Signalling parent %s that all children have EXITED or DETACHED", request->parent->name);
- unlang_interpret_mark_resumable(request->parent);
+ unlang_interpret_mark_runnable(request->parent);
}
return;
* the parent anything. Because we have that kind of
* relationship.
*
- * Note that we call unlang_interpret_mark_resumable() here
+ * Note that we call unlang_interpret_mark_runnable() here
* because unlang_parallel_process() calls
* unlang_interpret(), and NOT child->async->process.
*/
*/
if (state->num_complete == state->num_children) {
RDEBUG3("Signalling parent %s that all children have EXITED or DETACHED", request->parent->name);
- unlang_interpret_mark_resumable(request->parent);
+ unlang_interpret_mark_runnable(request->parent);
}
}
if (state->exec.ev) fr_event_timer_delete(&state->exec.ev);
- unlang_interpret_mark_resumable(request);
+ unlang_interpret_mark_runnable(request);
}
static void unlang_tmpl_exec_stdout_read(UNUSED fr_event_list_t *el, int fd, UNUSED int flags, void *uctx)
state->exec.failed = true;
unlang_tmpl_exec_cleanup(request);
- unlang_interpret_mark_resumable(request);
+ unlang_interpret_mark_runnable(request);
}
* A module may call unlang_yeild(), but still need to do something on FR_SIGNAL_DUP. If so, it's
* set here.
*
- * @note The callback is automatically removed on unlang_interpret_mark_resumable().
+ * @note The callback is automatically removed on unlang_interpret_mark_runnable().
*
* @param[in] rctx Resume ctx for the callback.
* @param[in] request The current request.
* A common pattern is to use ``return unlang_xlat_yield(...)``.
*
* @param[in] request The current request.
- * @param[in] resume Called on unlang_interpret_mark_resumable().
+ * @param[in] resume Called on unlang_interpret_mark_runnable().
* @param[in] signal Called on unlang_action().
* @param[in] rctx to pass to the callbacks.
* @return always returns RLM_MODULE_YIELD.
* Used when a xlat needs wait for an event.
* Typically the callback is set, and then the xlat returns unlang_xlat_yield().
*
- * @note The callback is automatically removed on unlang_interpret_mark_resumable(), i.e. if an event
+ * @note The callback is automatically removed on unlang_interpret_mark_runnable(), i.e. if an event
* on a registered FD occurs before the timeout event fires.
*
* @param[in] request the request.
* Used when a xlat needs to read from an FD. Typically the callback is set, and then the
* xlat returns unlang_xlat_yield().
*
- * @note The callback is automatically removed on unlang_interpret_mark_resumable(), so
+ * @note The callback is automatically removed on unlang_interpret_mark_runnable(), so
*
* @param[in] request the current request.
* @param[in] xlat_inst the xlat instance.
/** A callback when the request gets a fr_state_signal_t.
*
- * @note The callback is automatically removed on unlang_interpret_mark_resumable().
+ * @note The callback is automatically removed on unlang_interpret_mark_runnable().
*
* @param[in] request The current request.
* @param[in] xlat_inst the xlat instance.
*/
if (!fr_cond_assert(fired >= *yielded)) REDEBUG("Unexpected resume time");
- unlang_interpret_mark_resumable(request);
+ unlang_interpret_mark_runnable(request);
}
static void _xlat_delay_done(request_t *request,
*/
if (!fr_cond_assert(fired > *yielded)) REDEBUG("Unexpected resume time");
- unlang_interpret_mark_resumable(request);
+ unlang_interpret_mark_runnable(request);
}
static int delay_add(request_t *request, fr_time_t *resume_at, fr_time_t now,
RDEBUG2("No response to ICMP request for %pV (counter=%d)", echo->ip, echo->counter);
- unlang_interpret_mark_resumable(request);
+ unlang_interpret_mark_runnable(request);
}
/** Xlat to delay the request
* We have a reply!
*/
echo->replied = true;
- unlang_interpret_mark_resumable(echo->request);
+ unlang_interpret_mark_runnable(echo->request);
}
static void mod_icmp_error(fr_event_list_t *el, UNUSED int sockfd, UNUSED int flags,
}
-/** Continue after unlang_interpret_mark_resumable()
+/** Continue after unlang_interpret_mark_runnable()
*
*/
static unlang_action_t mod_radius_resume(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request, void *ctx)
r->rcode = RLM_MODULE_FAIL;
r->treq = NULL;
- unlang_interpret_mark_resumable(request);
+ unlang_interpret_mark_runnable(request);
}
/** Response has already been written to the rctx at this point
r->treq = NULL;
- unlang_interpret_mark_resumable(request);
+ unlang_interpret_mark_runnable(request);
}
/** Explicitly free resources associated with the protocol request
if (txn->ctx.defunct) return; /* Request was stopped */
fr_assert(txn->ctx.request);
- unlang_interpret_mark_resumable(txn->ctx.request); /* Continue processing */
+ unlang_interpret_mark_runnable(txn->ctx.request); /* Continue processing */
}
/** Called by a new thread to register a new req_pipe