From: Arran Cudbard-Bell Date: Fri, 2 Apr 2021 12:20:24 +0000 (+0100) Subject: Copy the interpreter from the parent X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c3fc2da42a4f8ce1d1cb51a20db1fa434e905392;p=thirdparty%2Ffreeradius-server.git Copy the interpreter from the parent --- diff --git a/src/lib/unlang/subrequest_child.c b/src/lib/unlang/subrequest_child.c index cdcd312c7b1..0db661d9207 100644 --- a/src/lib/unlang/subrequest_child.c +++ b/src/lib/unlang/subrequest_child.c @@ -309,6 +309,11 @@ int unlang_subrequest_child_push(rlm_rcode_t *out, request_t *child, unlang_frame_state_subrequest_t *state; unlang_stack_frame_t *frame; + /* + * Run in the same interpreter as the parent + */ + unlang_interpret_set(child, unlang_interpret_get(child->parent)); + /* * Push a new subrequest frame onto the stack * @@ -343,6 +348,11 @@ int unlang_subrequest_child_push(rlm_rcode_t *out, request_t *child, int unlang_subrequest_child_push_and_detach(request_t *child) { + /* + * Run in the same interpreter as the parent + */ + unlang_interpret_set(child, unlang_interpret_get(child->parent)); + /* * Ensures the child is setup correctly and adds * it into the runnable queue of whatever owns