DEBUG("%.*s%s {", indent, "\t\t\t\t\t\t\t\t\t\t\t",
single->module_instance->name);
} else if ((c->type > UNLANG_TYPE_MODULE_CALL) && (c->type <= UNLANG_TYPE_POLICY)) {
- unlang_group_t *g = unlang_group_to_module_call(c);
+ unlang_group_t *g = unlang_generic_to_group(c);
unlang_t *p;
DEBUG("%.*s%s {", indent, "\t\t\t\t\t\t\t\t\t\t\t",
unlang_ops[c->type].name);
#ifdef WITH_UNLANG
case UNLANG_TYPE_MAP:
- g = unlang_group_to_module_call(this); /* FIXMAP: print option 3, too */
+ g = unlang_generic_to_group(this); /* FIXMAP: print option 3, too */
DEBUG("%.*s%s %s {", depth, modcall_spaces,
unlang_ops[this->type].name,
cf_section_name2(g->cs));
goto print_map;
case UNLANG_TYPE_UPDATE:
- g = unlang_group_to_module_call(this);
+ g = unlang_generic_to_group(this);
DEBUG("%.*s%s {", depth, modcall_spaces,
unlang_ops[this->type].name);
break;
case UNLANG_TYPE_ELSE:
- g = unlang_group_to_module_call(this);
+ g = unlang_generic_to_group(this);
DEBUG("%.*s%s {", depth, modcall_spaces,
unlang_ops[this->type].name);
unlang_dump(g->children, depth + 1);
case UNLANG_TYPE_IF:
case UNLANG_TYPE_ELSIF:
- g = unlang_group_to_module_call(this);
+ g = unlang_generic_to_group(this);
cond_snprint(buffer, sizeof(buffer), g->cond);
DEBUG("%.*s%s (%s) {", depth, modcall_spaces,
unlang_ops[this->type].name, buffer);
case UNLANG_TYPE_SWITCH:
case UNLANG_TYPE_CASE:
- g = unlang_group_to_module_call(this);
+ g = unlang_generic_to_group(this);
tmpl_snprint(buffer, sizeof(buffer), g->vpt);
DEBUG("%.*s%s %s {", depth, modcall_spaces,
unlang_ops[this->type].name, buffer);
case UNLANG_TYPE_POLICY:
case UNLANG_TYPE_FOREACH:
- g = unlang_group_to_module_call(this);
+ g = unlang_generic_to_group(this);
DEBUG("%.*s%s %s {", depth, modcall_spaces,
unlang_ops[this->type].name, this->name);
unlang_dump(g->children, depth + 1);
#endif
case UNLANG_TYPE_GROUP:
- g = unlang_group_to_module_call(this);
+ g = unlang_generic_to_group(this);
DEBUG("%.*s%s {", depth, modcall_spaces,
unlang_ops[this->type].name);
unlang_dump(g->children, depth + 1);
case UNLANG_TYPE_LOAD_BALANCE:
case UNLANG_TYPE_REDUNDANT_LOAD_BALANCE:
- g = unlang_group_to_module_call(this);
+ g = unlang_generic_to_group(this);
DEBUG("%.*s%s {", depth, modcall_spaces,
unlang_ops[this->type].name);
unlang_dump(g->children, depth + 1);
}
}
- f = unlang_group_to_module_call(parent);
+ f = unlang_generic_to_group(parent);
rad_assert(f->vpt != NULL);
/*
c->debug_name = talloc_asprintf(c, "%s %s", unlang_ops[c->type].name, name2);
}
- g = unlang_group_to_module_call(c);
+ g = unlang_generic_to_group(c);
g->vpt = talloc_steal(g, vpt);
/*
c->name = unlang_ops[c->type].name;
c->debug_name = talloc_asprintf(c, "%s %s", unlang_ops[c->type].name, name2);
- g = unlang_group_to_module_call(c);
+ g = unlang_generic_to_group(c);
g->vpt = vpt;
return c;
c->name = unlang_ops[c->type].name;
c->debug_name = talloc_asprintf(c, "%s %s", unlang_ops[c->type].name, cf_section_name2(cs));
- g = unlang_group_to_module_call(c);
+ g = unlang_generic_to_group(c);
g->cond = cond;
return c;
{
unlang_group_t *p, *f;
- p = unlang_group_to_module_call(parent);
+ p = unlang_generic_to_group(parent);
if (!p->tail) goto else_fail;
- f = unlang_group_to_module_call(p->tail);
+ f = unlang_generic_to_group(p->tail);
if ((f->self.type != UNLANG_TYPE_IF) && (f->self.type != UNLANG_TYPE_ELSIF)) {
else_fail:
cf_log_err_cs(cs, "Invalid location for '%s'. There is no preceding 'if' or 'elsif' statement",
c = compile_group(parent, unlang_ctx, cs, group_type, parentgroup_type, mod_type);
if (!c) return NULL;
- g = unlang_group_to_module_call(c);
+ g = unlang_generic_to_group(c);
/*
* Allow for keyed load-balance / redundant-load-balance sections.
/*
* Check that all children are of the new type.
*/
- g = unlang_group_to_module_call(c);
+ g = unlang_generic_to_group(c);
for (child = g->children; child != NULL; child = child->next) {
unlang_module_call_t *single;
uint32_t count = 0;
- g = unlang_group_to_module_call(instruction);
+ g = unlang_generic_to_group(instruction);
if (!g->children) {
*presult = RLM_MODULE_NOOP;
*priority = instruction->actions[*presult];
unlang_t *instruction = frame->instruction;
unlang_group_t *g;
- g = unlang_group_to_module_call(instruction);
+ g = unlang_generic_to_group(instruction);
/*
* This should really have been caught in the
unlang_t *instruction = frame->instruction;
unlang_group_t *g;
- g = unlang_group_to_module_call(instruction);
+ g = unlang_generic_to_group(instruction);
if (!frame->resume) {
/*
unlang_t *instruction = frame->instruction;
unlang_group_t *g;
- g = unlang_group_to_module_call(instruction);
+ g = unlang_generic_to_group(instruction);
if (!g->children) {
*presult = RLM_MODULE_NOOP;
unlang_t *instruction = frame->instruction;
unlang_group_t *g;
- g = unlang_group_to_module_call(instruction);
+ g = unlang_generic_to_group(instruction);
if (!frame->resume) {
int i, foreach_depth = -1;
vp_map_t map;
vp_tmpl_t vpt;
- g = unlang_group_to_module_call(instruction);
+ g = unlang_generic_to_group(instruction);
memset(&cond, 0, sizeof(cond));
memset(&map, 0, sizeof(map));
for (this = g->children; this; this = this->next) {
rad_assert(this->type == UNLANG_TYPE_CASE);
- h = unlang_group_to_module_call(this);
+ h = unlang_generic_to_group(this);
if (h->vpt) continue;
found = this;
for (this = g->children; this; this = this->next) {
rad_assert(this->type == UNLANG_TYPE_CASE);
- h = unlang_group_to_module_call(this);
+ h = unlang_generic_to_group(this);
/*
* Remember the default case
int rcode;
unlang_stack_frame_t *frame = &stack->frame[stack->depth];
unlang_t *instruction = frame->instruction;
- unlang_group_t *g = unlang_group_to_module_call(instruction);
+ unlang_group_t *g = unlang_generic_to_group(instruction);
vp_map_t *map;
RINDENT();
{
unlang_stack_frame_t *frame = &stack->frame[stack->depth];
unlang_t *instruction = frame->instruction;
- unlang_group_t *g = unlang_group_to_module_call(instruction);
+ unlang_group_t *g = unlang_generic_to_group(instruction);
RINDENT();
*presult = map_proc(request, g->proc_inst);
unlang_t *instruction = frame->instruction;
unlang_group_t *g;
- g = unlang_group_to_module_call(instruction);
+ g = unlang_generic_to_group(instruction);
rad_assert(g->cond != NULL);
condition = cond_eval(request, *presult, 0, g->cond);