]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Refuse to load app_voicemail if res_adsi is not loaded (which is a symbol dependency)
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 13 Feb 2008 00:26:57 +0000 (00:26 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 13 Feb 2008 00:26:57 +0000 (00:26 +0000)
(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: https://origsvn.digium.com/svn/asterisk/branches/1.4@103556 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 85afac465c035e009b636ec404a90d820d54c43d..79eeb7b5174d9f28025bdb5ef09048a8760872b0 100644 (file)
@@ -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);