diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-09 16:22:04 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-09 16:22:04 +0000 |
commit | 114afd3010423ad96144ae3121458e18d06c75a7 (patch) | |
tree | 977456b473f32698ff9021a10c7f811501922037 /res/res_timing_timerfd.c | |
parent | 6b30a865c0d0f4636253df8ade3ff54fd73144e0 (diff) |
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/trunk@199743 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_timing_timerfd.c')
-rw-r--r-- | res/res_timing_timerfd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/res/res_timing_timerfd.c b/res/res_timing_timerfd.c index fb35ffb43..b2ff89c75 100644 --- a/res/res_timing_timerfd.c +++ b/res/res_timing_timerfd.c @@ -286,4 +286,8 @@ static int unload_module(void) return res; } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Timerfd Timing Interface"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Timerfd Timing Interface", + .load = load_module, + .unload = unload_module, + .load_pri = 10, + ); |