From: Arran Cudbard-Bell Date: Thu, 3 Jun 2021 18:05:16 +0000 (-0500) Subject: Pretty much every keyword can yield X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2c4ec405c75e8916064cb26d7c5e93f4b170241;p=thirdparty%2Ffreeradius-server.git Pretty much every keyword can yield --- diff --git a/src/lib/unlang/interpret.c b/src/lib/unlang/interpret.c index 8638ffbcdfd..670b88f46e2 100644 --- a/src/lib/unlang/interpret.c +++ b/src/lib/unlang/interpret.c @@ -417,36 +417,13 @@ unlang_frame_action_t frame_eval(request_t *request, unlang_stack_frame_t *frame * called the interpret. */ case UNLANG_ACTION_YIELD: - /* - * Detach is magic. The parent "subrequest" function - * takes care of bumping the instruction - * pointer... - */ - switch (frame->instruction->type) { - /* - * For sanity, we ensure that - * only known keywords can yield. - */ - case UNLANG_TYPE_MODULE: - case UNLANG_TYPE_PARALLEL: - case UNLANG_TYPE_SUBREQUEST: - case UNLANG_TYPE_XLAT: - case UNLANG_TYPE_CALL: - case UNLANG_TYPE_DETACH: - case UNLANG_TYPE_FUNCTION: - case UNLANG_TYPE_TMPL: - repeatable_set(frame); - yielded_set(frame); - RDEBUG4("** [%i] %s - yielding with current (%s %d)", stack->depth, __FUNCTION__, - fr_table_str_by_value(mod_rcode_table, frame->result, ""), - frame->priority); - DUMP_STACK; - return UNLANG_FRAME_ACTION_YIELD; - - default: - fr_assert(0); - return UNLANG_FRAME_ACTION_YIELD; - } + repeatable_set(frame); + yielded_set(frame); + RDEBUG4("** [%i] %s - yielding with current (%s %d)", stack->depth, __FUNCTION__, + fr_table_str_by_value(mod_rcode_table, frame->result, ""), + frame->priority); + DUMP_STACK; + return UNLANG_FRAME_ACTION_YIELD; /* * Instruction finished execution,