aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-18 20:24:13 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-18 20:24:13 +0000
commitc3dd782f95f809da02da9a4c2b663264136fef33 (patch)
tree86d537c19e5beeabc35e08694ff786d070738950 /apps
parent8c54673dbab7ca7680382d4cd70f668b1dcb48bd (diff)
Add a similar dependency on SMDI for voicemail as already exists for ADSI.
(closes issue #14846) Reported by: pj Patches: 20090413__bug14846__1.4.diff.txt uploaded by tilghman (license 14) 20090507__issue14846__1.6.0.diff.txt uploaded by tilghman (license 14) 20090507__issue14846__1.6.1.diff.txt uploaded by tilghman (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@195366 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index f3e423ec1..0509559bb 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -8862,7 +8862,10 @@ static int load_module(void)
{
int res;
char *adsi_loaded = ast_module_helper("", "res_adsi.so", 0, 0, 0, 0);
+ char *smdi_loaded = ast_module_helper("", "res_smdi.so", 0, 0, 0, 0);
free(adsi_loaded);
+ free(smdi_loaded);
+
if (!adsi_loaded) {
/* If embedded, res_adsi may be known as "res_adsi" not "res_adsi.so" */
adsi_loaded = ast_module_helper("", "res_adsi", 0, 0, 0, 0);
@@ -8873,6 +8876,16 @@ static int load_module(void)
}
}
+ if (!smdi_loaded) {
+ /* If embedded, res_smdi may be known as "res_smdi" not "res_smdi.so" */
+ smdi_loaded = ast_module_helper("", "res_smdi", 0, 0, 0, 0);
+ ast_free(smdi_loaded);
+ if (!smdi_loaded) {
+ ast_log(LOG_ERROR, "app_voicemail.so depends upon res_smdi.so\n");
+ return AST_MODULE_LOAD_DECLINE;
+ }
+ }
+
my_umask = umask(0);
umask(my_umask);
res = ast_register_application(app, vm_exec, synopsis_vm, descrip_vm);