Skip to content

Commit

Permalink
Set request->server_cs if not already set
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed May 24, 2016
1 parent 12217ed commit 4df0f89
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/modules.c
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,16 @@ static rlm_rcode_t indexed_modcall(rlm_components_t comp, int idx, REQUEST *requ
char const *module;
char const *component;

rad_assert(request->server_cs != NULL);
/*
* Some modules don't (yet) set this. It's also
* debatable as to whether they should be required to set
* it.
*/
if (!request->server_cs) {
rad_assert(request->server != NULL);

request->server_cs = cf_section_sub_find_name2(main_config.config, "server", request->server);
}

cs = cf_section_sub_find(request->server_cs, section_type_value[comp].section);
if (!cs) {
Expand Down

0 comments on commit 4df0f89

Please sign in to comment.