From: Arran Cudbard-Bell Date: Sat, 12 Nov 2016 20:34:11 +0000 (-0500) Subject: Fix doxygen and argument order for module_find_with_method X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db0af0b49dc19bb71088e3dc2024ad8eb9e9af90;p=thirdparty%2Ffreeradius-server.git Fix doxygen and argument order for module_find_with_method --- diff --git a/src/include/modpriv.h b/src/include/modpriv.h index 4cf197d4ebd..1511b7bf1a9 100644 --- a/src/include/modpriv.h +++ b/src/include/modpriv.h @@ -66,8 +66,8 @@ typedef struct module_instance { //!< instance data. } module_instance_t; -module_instance_t *module_find_with_method(CONF_SECTION *modules, char const *asked_name, - rlm_components_t *method); +module_instance_t *module_find_with_method(rlm_components_t *method, + CONF_SECTION *modules, char const *asked_name); module_instance_t *module_find(CONF_SECTION *modules, char const *asked_name); int module_sibling_section_find(CONF_SECTION **out, CONF_SECTION *module, char const *name); int module_hup(CONF_SECTION *cs, module_instance_t *node, time_t when); diff --git a/src/main/modcall.c b/src/main/modcall.c index c5e915971d5..62157938eea 100644 --- a/src/main/modcall.c +++ b/src/main/modcall.c @@ -2968,7 +2968,7 @@ static unlang_t *compile_item(unlang_t *parent, unlang_compile_t *unlang_ctx, CO * modules belongs in raddb/mods-available/, * which isn't loaded into the "modules" section. */ - this = module_find_with_method(modules, realname, &component); + this = module_find_with_method(&component, modules, realname); if (this) { UPDATE_CTX2; diff --git a/src/main/modules.c b/src/main/modules.c index b64877f5ddd..af2aeafb335 100644 --- a/src/main/modules.c +++ b/src/main/modules.c @@ -391,11 +391,15 @@ module_instance_t *module_find(CONF_SECTION *modules, char const *asked_name) * Extracts the method from the module name where the format is @verbatim . @endverbatim * and ensures that the module is instantiated, and implements the specified method. * + * @param[out] method the method component we found associated with the module. May be NULL. * @param[in] modules section in the main config. * @param[in] name The name of the module we're attempting to find, concatenated with * the method. + * @return + * - The module instance on success. + * - NULL on error. */ -module_instance_t *module_find_with_method(CONF_SECTION *modules, char const *name, rlm_components_t *method) +module_instance_t *module_find_with_method(rlm_components_t *method, CONF_SECTION *modules, char const *name) { char *p; rlm_components_t i; @@ -1034,7 +1038,7 @@ int modules_bootstrap(CONF_SECTION *root) /* * Allow "foo.authorize" in subsections. */ - instance = module_find_with_method(modules, cf_pair_attr(cp), NULL); + instance = module_find_with_method(NULL, modules, cf_pair_attr(cp)); if (!instance) { cf_log_err(subci, "Module instance \"%s\" referenced in " "%s block, does not exist", diff --git a/src/main/unit_test_map.c b/src/main/unit_test_map.c index 4a410dc8e74..66581cd83bc 100644 --- a/src/main/unit_test_map.c +++ b/src/main/unit_test_map.c @@ -44,7 +44,8 @@ char const *get_radius_dir(void) return NULL; } -module_instance_t *module_find_with_method(UNUSED CONF_SECTION *modules, UNUSED char const *name, UNUSED rlm_components_t *method) +module_instance_t *module_find_with_method(UNUSED rlm_components_t *method, + UNUSED CONF_SECTION *modules, UNUSED char const *name) { return NULL; }