aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-09 16:33:31 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-09 16:33:31 +0000
commitef047b4ab0a67e88724a70e40d0ddad8f4219806 (patch)
tree55086924dee11ce008085847ec889f7a847b00ee /res
parent3f77bd47c850a1a5d822c1dbac4102b8c72b192e (diff)
Merged revisions 199743 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r199743 | dvossel | 2009-06-09 11:22:04 -0500 (Tue, 09 Jun 2009) | 11 lines module load priority This patch adds the option to give a module a load priority. The value represents the order in which a module's load() function is initialized. The lower the value, the higher the priority. The value is only checked if the AST_MODFLAG_LOAD_ORDER flag is set. If the AST_MODFLAG_LOAD_ORDER flag is not set, the value will never be read and the module will be given the lowest possible priority on load. Since some modules are reliant on a timing interface, the timing modules have been given a high load priorty. (closes issue #15191) Reported by: alecdavis Tested by: dvossel Review: https://reviewboard.asterisk.org/r/262/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@199745 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_timing_dahdi.c6
-rw-r--r--res/res_timing_pthread.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/res/res_timing_dahdi.c b/res/res_timing_dahdi.c
index ae95cf9cd..f8235db63 100644
--- a/res/res_timing_dahdi.c
+++ b/res/res_timing_dahdi.c
@@ -199,4 +199,8 @@ static int unload_module(void)
return 0;
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "DAHDI Timing Interface");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "DAHDI Timing Interface",
+ .load = load_module,
+ .unload = unload_module,
+ .load_pri = 10,
+ );
diff --git a/res/res_timing_pthread.c b/res/res_timing_pthread.c
index 86ae1bb42..53ceeb5de 100644
--- a/res/res_timing_pthread.c
+++ b/res/res_timing_pthread.c
@@ -521,5 +521,8 @@ static int unload_module(void)
return res;
}
-
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "pthread Timing Interface");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "pthread Timing Interface",
+ .load = load_module,
+ .unload = unload_module,
+ .load_pri = 10,
+ );