From f460b33740cf765afd475e5a7d615a4775283347 Mon Sep 17 00:00:00 2001 From: russell Date: Tue, 8 Dec 2009 18:04:00 +0000 Subject: 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: http://svn.digium.com/svn/asterisk/branches/1.6.2@233694 f38db490-d61c-443f-a65b-d21fe96a405b --- formats/format_g723.c | 6 +++++- formats/format_g726.c | 6 +++++- formats/format_g729.c | 6 +++++- formats/format_gsm.c | 6 +++++- formats/format_h263.c | 6 +++++- formats/format_h264.c | 6 +++++- formats/format_ilbc.c | 6 +++++- formats/format_jpeg.c | 6 +++++- formats/format_ogg_vorbis.c | 7 +++++-- formats/format_pcm.c | 6 +++++- formats/format_siren14.c | 6 +++++- formats/format_siren7.c | 6 +++++- formats/format_sln.c | 6 +++++- formats/format_sln16.c | 6 +++++- formats/format_vox.c | 6 +++++- formats/format_wav.c | 6 +++++- formats/format_wav_gsm.c | 6 +++++- 17 files changed, 85 insertions(+), 18 deletions(-) diff --git a/formats/format_g723.c b/formats/format_g723.c index 7b527da8c..24fb97850 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 d54b52d2c..2bf9f9587 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 cf7e20be7..44de933e5 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 571fed8e1..80c85d62b 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 9b6ac6764..beeeb9b5e 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 fa938a8c6..3107e081a 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 439219305..f795d67a4 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 92117fce1..5aba68e74 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 e3b81eff1..46ce32afb 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 1a5637f3a..017686548 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_siren14.c b/formats/format_siren14.c index 0ac0174cf..ce514c831 100644 --- a/formats/format_siren14.c +++ b/formats/format_siren14.c @@ -135,4 +135,8 @@ static int unload_module(void) return ast_format_unregister(siren14_f.name); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "ITU G.722.1 Annex C (Siren14, licensed from Polycom)"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "ITU G.722.1 Annex C (Siren14, licensed from Polycom)", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_siren7.c b/formats/format_siren7.c index 0b61a72b2..48bc110b0 100644 --- a/formats/format_siren7.c +++ b/formats/format_siren7.c @@ -135,4 +135,8 @@ static int unload_module(void) return ast_format_unregister(siren7_f.name); } -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "ITU G.722.1 (Siren7, licensed from Polycom)"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "ITU G.722.1 (Siren7, licensed from Polycom)", + .load = load_module, + .unload = unload_module, + .load_pri = 10, +); diff --git a/formats/format_sln.c b/formats/format_sln.c index c78a4fdcb..9f85fb0e6 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 78260f337..af04b8114 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 a9aef6070..323986c12 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 b458442e2..8d6b1d2c1 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 737be96d7..089cc8654 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, +); -- cgit v1.2.3