From: Russell Bryant Date: Tue, 8 Dec 2009 18:02:37 +0000 (+0000) Subject: Merged revisions 233692 via svnmerge from X-Git-Tag: 1.6.1.12-rc1~3^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfff509eb24f295c3beca0947da37c1563a000cc;p=thirdparty%2Fasterisk.git Merged revisions 233692 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r233692 | russell | 2009-12-08 12:00:16 -0600 (Tue, 08 Dec 2009) | 16 lines 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 fix applies to trunk, 1.6.1, and 1.6.2. The fix for 1.4 and 1.6.0 will require a different approach since the module load priority functionality is not present in the module API. (issue #16412) Reported by: jiddings ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@233693 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/formats/format_g723.c b/formats/format_g723.c index 7b527da8cc..24fb978505 100644 --- a/formats/format_g723.c +++ b/formats/format_g723.c @@ -149,4 +149,8 @@ static int unload_module(void) return ast_format_unregister(g723_1_f.name); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "G.723.1 Simple Timestamp File Format"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "G.723.1 Simple Timestamp File Format", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_g726.c b/formats/format_g726.c index d54b52d2c0..2bf9f9587a 100644 --- a/formats/format_g726.c +++ b/formats/format_g726.c @@ -258,4 +258,8 @@ static int unload_module(void) return(0); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw G.726 (16/24/32/40kbps) data"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Raw G.726 (16/24/32/40kbps) data", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_g729.c b/formats/format_g729.c index cf7e20be7a..44de933e58 100644 --- a/formats/format_g729.c +++ b/formats/format_g729.c @@ -145,4 +145,8 @@ static int unload_module(void) return ast_format_unregister(g729_f.name); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw G729 data"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Raw G729 data", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_gsm.c b/formats/format_gsm.c index 571fed8e15..80c85d62bb 100644 --- a/formats/format_gsm.c +++ b/formats/format_gsm.c @@ -169,4 +169,8 @@ static int unload_module(void) return ast_format_unregister(gsm_f.name); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw GSM data"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Raw GSM data", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_h263.c b/formats/format_h263.c index 9b6ac6764f..beeeb9b5e9 100644 --- a/formats/format_h263.c +++ b/formats/format_h263.c @@ -183,4 +183,8 @@ static int unload_module(void) return ast_format_unregister(h263_f.name); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw H.263 data"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Raw H.263 data", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_h264.c b/formats/format_h264.c index fa938a8c67..3107e081a1 100644 --- a/formats/format_h264.c +++ b/formats/format_h264.c @@ -172,4 +172,8 @@ static int unload_module(void) return ast_format_unregister(h264_f.name); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw H.264 data"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Raw H.264 data", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_ilbc.c b/formats/format_ilbc.c index 22ca2edd1e..9a5b27e7e5 100644 --- a/formats/format_ilbc.c +++ b/formats/format_ilbc.c @@ -143,4 +143,8 @@ static int unload_module(void) return ast_format_unregister(ilbc_f.name); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw iLBC data"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Raw iLBC data", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_jpeg.c b/formats/format_jpeg.c index 92117fce12..5aba68e749 100644 --- a/formats/format_jpeg.c +++ b/formats/format_jpeg.c @@ -112,4 +112,8 @@ static int unload_module(void) return 0; } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "JPEG (Joint Picture Experts Group) Image Format"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "jpeg (joint picture experts group) image format", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_ogg_vorbis.c b/formats/format_ogg_vorbis.c index e3b81eff13..46ce32afb5 100644 --- a/formats/format_ogg_vorbis.c +++ b/formats/format_ogg_vorbis.c @@ -556,5 +556,8 @@ static int unload_module(void) return ast_format_unregister(vorbis_f.name); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "OGG/Vorbis audio"); - +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "OGG/Vorbis audio", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_pcm.c b/formats/format_pcm.c index 60f32892f4..efee90a754 100644 --- a/formats/format_pcm.c +++ b/formats/format_pcm.c @@ -494,4 +494,8 @@ static int unload_module(void) || ast_format_unregister(g722_f.name); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw/Sun uLaw/ALaw 8KHz (PCM,PCMA,AU), G.722 16Khz"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Raw/Sun uLaw/ALaw 8KHz (PCM,PCMA,AU), G.722 16Khz", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_sln.c b/formats/format_sln.c index c78a4fdcba..9f85fb0e60 100644 --- a/formats/format_sln.c +++ b/formats/format_sln.c @@ -127,4 +127,8 @@ static int unload_module(void) return ast_format_unregister(slin_f.name); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw Signed Linear Audio support (SLN)"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Raw Signed Linear Audio support (SLN)", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_sln16.c b/formats/format_sln16.c index 78260f3373..af04b81147 100644 --- a/formats/format_sln16.c +++ b/formats/format_sln16.c @@ -135,4 +135,8 @@ static int unload_module(void) return ast_format_unregister(slin_f.name); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Raw Signed Linear 16KHz Audio support (SLN16)"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Raw Signed Linear 16KHz Audio support (SLN16)", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_vox.c b/formats/format_vox.c index a9aef6070a..323986c127 100644 --- a/formats/format_vox.c +++ b/formats/format_vox.c @@ -132,4 +132,8 @@ static int unload_module(void) return ast_format_unregister(vox_f.name); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Dialogic VOX (ADPCM) File Format"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Dialogic VOX (ADPCM) File Format", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_wav.c b/formats/format_wav.c index b458442e20..8d6b1d2c11 100644 --- a/formats/format_wav.c +++ b/formats/format_wav.c @@ -495,4 +495,8 @@ static int unload_module(void) return ast_format_unregister(wav_f.name); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Microsoft WAV format (8000Hz Signed Linear)"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Microsoft WAV format (8000Hz Signed Linear)", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c index 737be96d7d..089cc86544 100644 --- a/formats/format_wav_gsm.c +++ b/formats/format_wav_gsm.c @@ -548,4 +548,8 @@ static int unload_module(void) return ast_format_unregister(wav49_f.name); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Microsoft WAV format (Proprietary GSM)"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Microsoft WAV format (Proprietary GSM)", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +);