]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix doxygen and argument order for module_find_with_method
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 12 Nov 2016 20:34:11 +0000 (15:34 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 12 Nov 2016 20:34:11 +0000 (15:34 -0500)
src/include/modpriv.h
src/main/modcall.c
src/main/modules.c
src/main/unit_test_map.c

index 4cf197d4ebdb512537fb408eb6de2403561d40a6..1511b7bf1a97184d2d88d806a70cb30250d49562 100644 (file)
@@ -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);
index c5e915971d5669f31fc472736a46095e6d4b3fce..62157938eea773ab4d5b7bffbabd6aedaf7a6811 100644 (file)
@@ -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;
 
index b64877f5ddd92883b8ccc80cfb83385a00404bcd..af2aeafb3352372811db3b026be7aaeebac62e5f 100644 (file)
@@ -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 <module>.<method> @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",
index 4a410dc8e749cefa4d9e68eafc2ec757aa169ca0..66581cd83bccbeb89b50bf44ad4d0d05fd45e4f1 100644 (file)
@@ -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;
 }