void *process_inst;
g = unlang_generic_to_group(instruction);
- rad_assert(g->children != NULL);
+ if (!g->num_children) {
+ *presult = RLM_MODULE_NOOP;
+ return UNLANG_ACTION_CALCULATE_RESULT;
+ }
server = cf_section_name2(g->server_cs);
* *intepreter* type is GROUP, even if the *debug names*
* are something else.
*/
- g = group_allocate(parent, cs, unlang_ops[mod_type].debug_braces ? UNLANG_TYPE_GROUP : mod_type);
+ g = group_allocate(parent, cs, mod_type);
if (!g) return NULL;
c = unlang_group_to_generic(g);
}
} /* else it's a default 'case' statement */
- if (!cf_item_next(cs, NULL)) {
- talloc_free(vpt);
- return compile_empty(parent, unlang_ctx, cs, UNLANG_TYPE_CASE, COND_TYPE_INVALID);
- }
-
c = compile_section(parent, unlang_ctx, cs, UNLANG_TYPE_CASE);
if (!c) {
talloc_free(vpt);
uint32_t count = 0;
g = unlang_generic_to_group(instruction);
- rad_assert(g->children != NULL);
+ if (!g->num_children) {
+ *presult = RLM_MODULE_NOOP;
+ return UNLANG_ACTION_CALCULATE_RESULT;
+ }
RDEBUG4("%s setting up", frame->instruction->debug_name);
unlang_stack_frame_t *frame = &stack->frame[stack->depth];
unlang_frame_state_subrequest_t *state = talloc_get_type_abort(frame->state, unlang_frame_state_subrequest_t);
REQUEST *child = state->child;
+ unlang_group_t *g;
+
+ g = unlang_generic_to_group(frame->instruction);
+ if (!g->num_children) {
+ *presult = RLM_MODULE_NOOP;
+ return UNLANG_ACTION_CALCULATE_RESULT;
+ }
/*
* Restore state from the parent to the
* Initialize the state
*/
g = unlang_generic_to_group(instruction);
- rad_assert(g->children != NULL);
+ if (!g->num_children) {
+ *presult = RLM_MODULE_NOOP;
+ return UNLANG_ACTION_CALCULATE_RESULT;
+ }
child = state->child = unlang_io_subrequest_alloc(request, g->dict, UNLANG_DETACHABLE);
if (!child) {
if (&User-Name == 'bob') {
ok
}
-else { # ERROR
- # empty is not allowed
+else {
}
+success
#
-# Check that redundant blocks can't be empty
+# Redundant blocks can be empry, and don't do anything
#
-redundant { # ERROR
+redundant {
}
+success
}
if (&Tmp-Integer-0 != "%{Tmp-Integer-1[#]}") {
+ update reply {
+ &Filter-Id := "shit %{Tmp-Integer-0}"
+ }
test_fail
}
else {