Set a module load priority for format modules.

A recent change to app_voicemail made it such that the module now assumes that
all format modules are available while processing voicemail configuration.
However, when autoloading modules, it was possible that app_voicemail was
loaded before the format modules. Since format modules don't depend on
anything, set a module load priority on them to ensure that they get loaded
first when autoloading.

This version of the patch is specific to Asterisk 1.4 and 1.6.0.  These versions
did not already support module load priority in the module API.  This adds a
trivial version of this which is just a module flag to include it in a pass before
loading "everything".

Thanks to mmichelson for the review!

(closes issue #16412)
Reported by: jiddings
Tested by: russell

Review: https://reviewboard.asterisk.org/r/445/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@233782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2009-12-09 15:14:21 +00:00
parent a52e302427
commit 4dfd9d4800
16 changed files with 136 additions and 60 deletions

View File

@@ -180,6 +180,14 @@ enum ast_module_flags {
AST_MODFLAG_DEFAULT = 0,
AST_MODFLAG_GLOBAL_SYMBOLS = (1 << 0),
AST_MODFLAG_BUILDSUM = (1 << 1),
/*!
* \brief Load this module in the first pass on auto loading
*
* When module auto loading is used, modules with this flag set will
* be loaded after preloaded modules, but before all modules being
* automatically loaded without this flag set on them.
*/
AST_MODFLAG_LOAD_FIRST = (1 << 2),
};
struct ast_module_info {