aboutsummaryrefslogtreecommitdiffstats
path: root/formats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-09 15:28:59 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-09 15:28:59 +0000
commit410225d9651a936e85dba001ee693664fdc5c8f4 (patch)
tree06bd373dccdd5d5e67fbd69767558f87dc4238f4 /formats
parent604872d772869fbe7d78a4e21940cdca32da9429 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.6.0@233841 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'formats')
-rw-r--r--formats/format_g723.c5
-rw-r--r--formats/format_g726.c5
-rw-r--r--formats/format_g729.c5
-rw-r--r--formats/format_gsm.c5
-rw-r--r--formats/format_h263.c5
-rw-r--r--formats/format_h264.c5
-rw-r--r--formats/format_ilbc.c5
-rw-r--r--formats/format_jpeg.c5
-rw-r--r--formats/format_ogg_vorbis.c5
-rw-r--r--formats/format_pcm.c5
-rw-r--r--formats/format_sln.c5
-rw-r--r--formats/format_sln16.c5
-rw-r--r--formats/format_vox.c5
-rw-r--r--formats/format_wav.c5
-rw-r--r--formats/format_wav_gsm.c5
15 files changed, 60 insertions, 15 deletions
diff --git a/formats/format_g723.c b/formats/format_g723.c
index 6e57b4fa8..8580631f9 100644
--- a/formats/format_g723.c
+++ b/formats/format_g723.c
@@ -149,4 +149,7 @@ 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_FIRST, "G.723.1 Simple Timestamp File Format",
+ .load = load_module,
+ .unload = unload_module,
+);
diff --git a/formats/format_g726.c b/formats/format_g726.c
index e27476fed..c8b6233da 100644
--- a/formats/format_g726.c
+++ b/formats/format_g726.c
@@ -258,4 +258,7 @@ 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_FIRST, "Raw G.726 (16/24/32/40kbps) data",
+ .load = load_module,
+ .unload = unload_module,
+);
diff --git a/formats/format_g729.c b/formats/format_g729.c
index 8df463d81..09a9caba4 100644
--- a/formats/format_g729.c
+++ b/formats/format_g729.c
@@ -145,4 +145,7 @@ 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_FIRST, "Raw G729 data",
+ .load = load_module,
+ .unload = unload_module,
+);
diff --git a/formats/format_gsm.c b/formats/format_gsm.c
index d8a0813b6..073d5d606 100644
--- a/formats/format_gsm.c
+++ b/formats/format_gsm.c
@@ -169,4 +169,7 @@ 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_FIRST, "Raw GSM data",
+ .load = load_module,
+ .unload = unload_module,
+);
diff --git a/formats/format_h263.c b/formats/format_h263.c
index b0b5cb27d..709f3c2ff 100644
--- a/formats/format_h263.c
+++ b/formats/format_h263.c
@@ -183,4 +183,7 @@ 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_FIRST, "Raw H.263 data",
+ .load = load_module,
+ .unload = unload_module,
+);
diff --git a/formats/format_h264.c b/formats/format_h264.c
index 06def313c..2d09177a8 100644
--- a/formats/format_h264.c
+++ b/formats/format_h264.c
@@ -172,4 +172,7 @@ 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_FIRST, "Raw H.264 data",
+ .load = load_module,
+ .unload = unload_module,
+);
diff --git a/formats/format_ilbc.c b/formats/format_ilbc.c
index fac2149bc..1f0b8ce0b 100644
--- a/formats/format_ilbc.c
+++ b/formats/format_ilbc.c
@@ -143,4 +143,7 @@ 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_FIRST, "Raw iLBC data",
+ .load = load_module,
+ .unload = unload_module,
+);
diff --git a/formats/format_jpeg.c b/formats/format_jpeg.c
index 4d8d7855d..3613b364f 100644
--- a/formats/format_jpeg.c
+++ b/formats/format_jpeg.c
@@ -112,4 +112,7 @@ 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_FIRST, "JPEG (Joint Picture Experts Group) Image Format",
+ .load = load_module,
+ .unload = unload_module,
+);
diff --git a/formats/format_ogg_vorbis.c b/formats/format_ogg_vorbis.c
index c2dc977b6..ea36a7c67 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_FIRST, "OGG/Vorbis audio",
+ .load = load_module,
+ .unload = unload_module,
+);
diff --git a/formats/format_pcm.c b/formats/format_pcm.c
index a9c44d502..1530a5dc9 100644
--- a/formats/format_pcm.c
+++ b/formats/format_pcm.c
@@ -494,4 +494,7 @@ 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_FIRST, "Raw/Sun uLaw/ALaw 8KHz (PCM,PCMA,AU), G.722 16Khz",
+ .load = load_module,
+ .unload = unload_module,
+);
diff --git a/formats/format_sln.c b/formats/format_sln.c
index 51f796271..212b20378 100644
--- a/formats/format_sln.c
+++ b/formats/format_sln.c
@@ -127,4 +127,7 @@ 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_FIRST, "Raw Signed Linear Audio support (SLN)",
+ .load = load_module,
+ .unload = unload_module,
+);
diff --git a/formats/format_sln16.c b/formats/format_sln16.c
index 50349f2dd..6cdd392be 100644
--- a/formats/format_sln16.c
+++ b/formats/format_sln16.c
@@ -135,4 +135,7 @@ 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_FIRST, "Raw Signed Linear 16KHz Audio support (SLN16)",
+ .load = load_module,
+ .unload = unload_module,
+);
diff --git a/formats/format_vox.c b/formats/format_vox.c
index f22b4881a..9bb76de26 100644
--- a/formats/format_vox.c
+++ b/formats/format_vox.c
@@ -132,4 +132,7 @@ 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_FIRST, "Dialogic VOX (ADPCM) File Format",
+ .load = load_module,
+ .unload = unload_module,
+);
diff --git a/formats/format_wav.c b/formats/format_wav.c
index 94980477a..3a43c39bc 100644
--- a/formats/format_wav.c
+++ b/formats/format_wav.c
@@ -491,4 +491,7 @@ 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_FIRST, "Microsoft WAV format (8000Hz Signed Linear)",
+ .load = load_module,
+ .unload = unload_module,
+);
diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c
index 9c71c591e..7c63d280f 100644
--- a/formats/format_wav_gsm.c
+++ b/formats/format_wav_gsm.c
@@ -548,4 +548,7 @@ 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_FIRST, "Microsoft WAV format (Proprietary GSM)",
+ .load = load_module,
+ .unload = unload_module,
+);