From: Alan T. DeKok Date: Sun, 20 Nov 2011 16:44:55 +0000 (+0100) Subject: Update for 3.0 API X-Git-Tag: release_3_0_0_beta0~491 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19f3d74960be43ae32d161b1fabfe005ba6a4286;p=thirdparty%2Ffreeradius-server.git Update for 3.0 API We do lookups on attr+vendor, not just attr --- diff --git a/src/main/modules.c b/src/main/modules.c index 8760fbd81f3..fb4f92c2fdf 100644 --- a/src/main/modules.c +++ b/src/main/modules.c @@ -790,7 +790,8 @@ int indexed_modcall(int comp, int idx, REQUEST *request) * block */ static int load_subcomponent_section(modcallable *parent, CONF_SECTION *cs, - rbtree_t *components, int attr, int comp) + rbtree_t *components, + const DICT_ATTR *dattr, int comp) { indexed_modcallable *subcomp; modcallable *ml; @@ -824,7 +825,7 @@ static int load_subcomponent_section(modcallable *parent, CONF_SECTION *cs, * automatically. If it isn't found, it's a serious * error. */ - dval = dict_valbyname(attr, 0, name2); + dval = dict_valbyname(dattr->attr, dattr->vendor, name2); if (!dval) { cf_log_err(cf_sectiontoitem(cs), "%s %s Not previously configured", @@ -917,7 +918,7 @@ static int load_component_section(CONF_SECTION *cs, section_type_value[comp].typename) == 0) { if (!load_subcomponent_section(NULL, scs, components, - dattr->attr, + dattr, comp)) { return -1; /* FIXME: memleak? */ } @@ -1202,7 +1203,7 @@ static int load_byserver(CONF_SECTION *cs) DEBUG2(" Module: Checking dhcp %s {...} for more modules to load", name2); if (!load_subcomponent_section(NULL, subcs, components, - dattr->attr, + dattr, RLM_COMPONENT_POST_AUTH)) { goto error; /* FIXME: memleak? */ }