*/
curl_multi_remove_handle(mandle, candle);
- unlang_interpret_resumable(request);
+ unlang_interpret_mark_resumable(request);
}
break;
*
* @param[in] request The current request.
*/
-void unlang_interpret_resumable(request_t *request)
+void unlang_interpret_mark_resumable(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_resumable(request_t *request);
+void unlang_interpret_mark_resumable(request_t *request);
void unlang_interpret_signal(request_t *request, fr_state_signal_t action);
* If we have a parent, then we're running synchronously
* with it. Allow the parent to resume.
*/
- if (request->parent) unlang_interpret_resumable(request->parent);
+ if (request->parent) unlang_interpret_mark_resumable(request->parent);
/*
* Don't bother setting request->reply->code.
* 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_resumable().
+ * @note The callback is automatically removed on unlang_interpret_mark_resumable().
*
* 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_resumable().
+ * @note The callback is automatically removed on unlang_interpret_mark_resumable().
*
* @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_resumable().
+ * @param[in] resume Called on unlang_interpret_mark_resumable().
* @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_resumable(), i.e. if an event
+ * @note The callback is automatically removed on unlang_interpret_mark_resumable(), 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_resumable(), so
+ * @note The callback is automatically removed on unlang_interpret_mark_resumable(), 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_resumable().
+ * @note The callback is automatically removed on unlang_interpret_mark_resumable().
*
* @param[in] mctx calling context for the module.
* Contains global, thread-specific, and call-specific data for a module.
* the parent anything. Because we have that kind of
* relationship.
*
- * Note that we call unlang_interpret_resumable() here
+ * Note that we call unlang_interpret_mark_resumable() here
* because unlang_parallel_process() calls
* unlang_interpret(), and NOT child->async->process.
*/
if (request->parent) {
child->state = CHILD_EXITED;
- unlang_interpret_resumable(request->parent);
+ unlang_interpret_mark_resumable(request->parent);
}
/*
case CHILD_YIELDED:
fr_assert(state->children[i].child != NULL);
- if (state->children[i].child->runnable_id == -2) { /* see unlang_interpret_resumable() */
+ if (state->children[i].child->runnable_id == -2) { /* see unlang_interpret_mark_resumable() */
(void) fr_heap_extract(state->children[i].child->backlog,
state->children[i].child);
goto runnable;
if (state->ev) fr_event_timer_delete(&state->ev);
- unlang_interpret_resumable(request);
+ unlang_interpret_mark_resumable(request);
}
static void unlang_tmpl_exec_read(UNUSED fr_event_list_t *el, UNUSED int fd, UNUSED int flags, void *uctx)
REDEBUG("Error reading from child program - %s", fr_syserror(errno));
unlang_tmpl_exec_cleanup(request);
- unlang_interpret_resumable(request);
+ unlang_interpret_mark_resumable(request);
return;
}
state->failed = true;
unlang_tmpl_exec_cleanup(request);
- unlang_interpret_resumable(request);
+ unlang_interpret_mark_resumable(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_resumable().
+ * @note The callback is automatically removed on unlang_interpret_mark_resumable().
*
* @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_resumable().
+ * @param[in] resume Called on unlang_interpret_mark_resumable().
* @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_resumable(), i.e. if an event
+ * @note The callback is automatically removed on unlang_interpret_mark_resumable(), 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_resumable(), so
+ * @note The callback is automatically removed on unlang_interpret_mark_resumable(), 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_resumable().
+ * @note The callback is automatically removed on unlang_interpret_mark_resumable().
*
* @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_resumable(request);
+ unlang_interpret_mark_resumable(request);
}
static void _xlat_delay_done(request_t *request,
*/
if (!fr_cond_assert(fired > *yielded)) REDEBUG("Unexpected resume time");
- unlang_interpret_resumable(request);
+ unlang_interpret_mark_resumable(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_resumable(request);
+ unlang_interpret_mark_resumable(request);
}
/** Xlat to delay the request
* We have a reply!
*/
echo->replied = true;
- unlang_interpret_resumable(echo->request);
+ unlang_interpret_mark_resumable(echo->request);
}
static void mod_icmp_error(fr_event_list_t *el, UNUSED int sockfd, UNUSED int flags,
}
-/** Continue after unlang_interpret_resumable()
+/** Continue after unlang_interpret_mark_resumable()
*
*/
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_resumable(request);
+ unlang_interpret_mark_resumable(request);
}
/** Response has already been written to the rctx at this point
r->treq = NULL;
- unlang_interpret_resumable(request);
+ unlang_interpret_mark_resumable(request);
}
/** Explicitly free resources associated with the protocol request
if (txn->ctx.defunct) return; /* Request was stopped */
fr_assert(txn->ctx.request);
- unlang_interpret_resumable(txn->ctx.request); /* Continue processing */
+ unlang_interpret_mark_resumable(txn->ctx.request); /* Continue processing */
}
/** Called by a new thread to register a new req_pipe