}
by_section:
+ if (!vs) goto section_error;
+
/*
* First look for the section name in the module's
* bindings. If that fails, look for the alt
if (mmc_out) section_name_dup(ctx, &mmc->asked, section);
}
if (!mmb) {
+ section_error:
fr_strerror_printf("Module \"%s\" has no method for section %s %s { ... }, i.e. %s%s%s",
mmc->mi->name,
section->name1,
int virtual_servers_instantiate(void)
{
size_t i, server_cnt;
+ CONF_SECTION *cs;
+ fr_rb_iter_inorder_t iter;
/*
* User didn't specify any "server" sections
(void) virtual_server_warn_unused(server_cs, process->compile_list);
}
+ /*
+ * Iterate over virtual modules to see if we can compile them.
+ */
+ for (cs = module_rlm_virtual_iter_init(&iter);
+ cs != NULL;
+ cs = module_rlm_virtual_iter_next(&iter)) {
+ fr_dict_t const *dict;
+
+ dict = virtual_server_dict_by_cs(cs); /* cheating! */
+ if (!dict) continue;
+
+ if (unlang_compile_virtual_module(cs, dict) < 0) return -1;
+ }
+
if (modules_instantiate(process_modules) < 0) {
PERROR("Failed instantiating process modules");
return -1;