From: Alan T. DeKok Date: Fri, 11 Oct 2019 17:56:29 +0000 (-0400) Subject: if we dereference it as a group, it has to be defined as a group X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1469c414c666850bfacbf39b284f4ccd74f049fc;p=thirdparty%2Ffreeradius-server.git if we dereference it as a group, it has to be defined as a group --- diff --git a/src/lib/unlang/subrequest.c b/src/lib/unlang/subrequest.c index eed4ec91497..673e1f6301b 100644 --- a/src/lib/unlang/subrequest.c +++ b/src/lib/unlang/subrequest.c @@ -399,20 +399,22 @@ void unlang_subrequest_free(REQUEST **child) *child = NULL; } -static unlang_t subrequest_instruction = { - .type = UNLANG_TYPE_SUBREQUEST, - .name = "subrequest", - .debug_name = "subrequest", - .actions = { - [RLM_MODULE_REJECT] = 0, - [RLM_MODULE_FAIL] = MOD_ACTION_RETURN, /* Exit out of nested levels */ - [RLM_MODULE_OK] = 0, - [RLM_MODULE_HANDLED] = 0, - [RLM_MODULE_INVALID] = 0, - [RLM_MODULE_DISALLOW] = 0, - [RLM_MODULE_NOTFOUND] = 0, - [RLM_MODULE_NOOP] = 0, - [RLM_MODULE_UPDATED] = 0 +static unlang_group_t subrequest_instruction = { + .self = { + .type = UNLANG_TYPE_SUBREQUEST, + .name = "subrequest", + .debug_name = "subrequest", + .actions = { + [RLM_MODULE_REJECT] = 0, + [RLM_MODULE_FAIL] = MOD_ACTION_RETURN, /* Exit out of nested levels */ + [RLM_MODULE_OK] = 0, + [RLM_MODULE_HANDLED] = 0, + [RLM_MODULE_INVALID] = 0, + [RLM_MODULE_DISALLOW] = 0, + [RLM_MODULE_NOTFOUND] = 0, + [RLM_MODULE_NOOP] = 0, + [RLM_MODULE_UPDATED] = 0 + }, }, }; @@ -441,7 +443,7 @@ void unlang_subrequest_push(rlm_rcode_t *out, REQUEST *child, /* * Push a new subrequest frame onto the stack */ - unlang_interpret_push(child->parent, &subrequest_instruction, RLM_MODULE_UNKNOWN, UNLANG_NEXT_STOP, top_frame); + unlang_interpret_push(child->parent, &subrequest_instruction.self, RLM_MODULE_UNKNOWN, UNLANG_NEXT_STOP, top_frame); frame = &stack->frame[stack->depth]; /*