From: Alan T. DeKok Date: Wed, 22 Feb 2017 14:47:57 +0000 (-0500) Subject: use correct name for function X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8f6208851176b02fc23f23db62b6a11b092bef8;p=thirdparty%2Ffreeradius-server.git use correct name for function --- diff --git a/src/include/interpreter.h b/src/include/interpreter.h index 4a0d53cd875..e068a88c3e6 100644 --- a/src/include/interpreter.h +++ b/src/include/interpreter.h @@ -273,7 +273,7 @@ static inline unlang_module_call_t *unlang_generic_to_module_call(unlang_t *p) return talloc_get_type_abort(p, unlang_module_call_t); } -static inline unlang_group_t *unlang_group_to_module_call(unlang_t *p) +static inline unlang_group_t *unlang_generic_to_group(unlang_t *p) { rad_assert((p->type > UNLANG_TYPE_MODULE_CALL) && (p->type <= UNLANG_TYPE_POLICY)); diff --git a/src/main/unlang_compile.c b/src/main/unlang_compile.c index 97bc03be946..368449cc331 100644 --- a/src/main/unlang_compile.c +++ b/src/main/unlang_compile.c @@ -101,7 +101,7 @@ static void dump_mc(unlang_t *c, int indent) 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); @@ -987,14 +987,14 @@ static void unlang_dump(unlang_t *mc, int depth) #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); @@ -1008,7 +1008,7 @@ static void unlang_dump(unlang_t *mc, int depth) 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); @@ -1017,7 +1017,7 @@ static void unlang_dump(unlang_t *mc, int depth) 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); @@ -1027,7 +1027,7 @@ static void unlang_dump(unlang_t *mc, int depth) 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); @@ -1037,7 +1037,7 @@ static void unlang_dump(unlang_t *mc, int depth) 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); @@ -1050,7 +1050,7 @@ static void unlang_dump(unlang_t *mc, int depth) #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); @@ -1059,7 +1059,7 @@ static void unlang_dump(unlang_t *mc, int depth) 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); @@ -2054,7 +2054,7 @@ static unlang_t *compile_case(unlang_t *parent, unlang_compile_t *unlang_ctx, CO } } - f = unlang_group_to_module_call(parent); + f = unlang_generic_to_group(parent); rad_assert(f->vpt != NULL); /* @@ -2116,7 +2116,7 @@ static unlang_t *compile_case(unlang_t *parent, unlang_compile_t *unlang_ctx, CO 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); /* @@ -2205,7 +2205,7 @@ static unlang_t *compile_foreach(unlang_t *parent, unlang_compile_t *unlang_ctx, 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; @@ -2299,7 +2299,7 @@ static unlang_t *compile_if(unlang_t *parent, unlang_compile_t *unlang_ctx, CONF 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; @@ -2309,10 +2309,10 @@ static int previous_if(CONF_SECTION *cs, unlang_t *parent, unlang_type_t mod_typ { 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", @@ -2451,7 +2451,7 @@ static unlang_t *compile_redundant(unlang_t *parent, unlang_compile_t *unlang_ct 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. @@ -2558,7 +2558,7 @@ static unlang_t *compile_parallel(unlang_t *parent, unlang_compile_t *unlang_ctx /* * 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; diff --git a/src/main/unlang_interpret.c b/src/main/unlang_interpret.c index b42b29fe860..584a210cd91 100644 --- a/src/main/unlang_interpret.c +++ b/src/main/unlang_interpret.c @@ -110,7 +110,7 @@ static unlang_action_t unlang_load_balance(REQUEST *request, unlang_stack_t *sta 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]; @@ -251,7 +251,7 @@ static unlang_action_t unlang_group(REQUEST *request, unlang_stack_t *stack, 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 @@ -283,7 +283,7 @@ static unlang_action_t unlang_parallel(UNUSED REQUEST *request, unlang_stack_t * 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) { /* @@ -306,7 +306,7 @@ static unlang_action_t unlang_case(REQUEST *request, unlang_stack_t *stack, 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; @@ -353,7 +353,7 @@ static unlang_action_t unlang_foreach(REQUEST *request, unlang_stack_t *stack, 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; @@ -501,7 +501,7 @@ static unlang_action_t unlang_switch(REQUEST *request, unlang_stack_t *stack, 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)); @@ -526,7 +526,7 @@ static unlang_action_t unlang_switch(REQUEST *request, unlang_stack_t *stack, 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; @@ -560,7 +560,7 @@ static unlang_action_t unlang_switch(REQUEST *request, unlang_stack_t *stack, 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 @@ -638,7 +638,7 @@ static unlang_action_t unlang_update(REQUEST *request, unlang_stack_t *stack, 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(); @@ -663,7 +663,7 @@ static unlang_action_t unlang_map(REQUEST *request, unlang_stack_t *stack, { 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); @@ -755,7 +755,7 @@ static unlang_action_t unlang_if(REQUEST *request, unlang_stack_t *stack, 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);