aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-13 00:26:57 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-13 00:26:57 +0000
commitd932a091b14211f9dc1458b4beb386c5596457e7 (patch)
tree92f28ef7b4fd42a0b0dd31e3bc868b31a6e030ea /apps
parent5ba519d7e7e74e6095e59e0f0ab5e0521274e8ec (diff)
Refuse to load app_voicemail if res_adsi is not loaded (which is a symbol dependency)
(closes issue #11760) Reported by: non-poster Patches: 20080114__bug11760.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76, non-poster, jamesgolovich git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103556 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 85afac465..79eeb7b51 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -7903,6 +7903,13 @@ static int unload_module(void)
static int load_module(void)
{
int res;
+ char *adsi_loaded = ast_module_helper("", "res_adsi.so", 0, 0, 0, 0);
+ free(adsi_loaded);
+ if (!adsi_loaded) {
+ ast_log(LOG_ERROR, "app_voicemail.so depends upon res_adsi.so");
+ return AST_MODULE_LOAD_DECLINE;
+ }
+
my_umask = umask(0);
umask(my_umask);
res = ast_register_application(app, vm_exec, synopsis_vm, descrip_vm);