]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Copy the interpreter from the parent
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 2 Apr 2021 12:20:24 +0000 (13:20 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 2 Apr 2021 12:20:24 +0000 (13:20 +0100)
src/lib/unlang/subrequest_child.c

index cdcd312c7b1d784f9614c664ad7b1a540835bd3f..0db661d92070c44f3af5f16dcec0242852c82b9f 100644 (file)
@@ -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