]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
When modules are embedded, they take on a different name, without the ".so"
authorTilghman Lesher <tilghman@meg.abyt.es>
Mon, 28 Apr 2008 04:47:39 +0000 (04:47 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Mon, 28 Apr 2008 04:47:39 +0000 (04:47 +0000)
extension.  Specifically check for this name, when we're checking if a module
is loaded.
(Closes issue #12534)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114708 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c
channels/chan_gtalk.c

index 3a285063d6d3ec33f38a4ebdc8fd3a399d421f93..8118a49e010a745f698462efc78e89cd3838ebc7 100644 (file)
@@ -7933,8 +7933,13 @@ static int load_module(void)
        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\n");
-               return AST_MODULE_LOAD_DECLINE;
+               /* 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);
+               ast_free(adsi_loaded);
+               if (!adsi_loaded) {
+                       ast_log(LOG_ERROR, "app_voicemail.so depends upon res_adsi.so\n");
+                       return AST_MODULE_LOAD_DECLINE;
+               }
        }
 
        my_umask = umask(0);
index 2dc56035e5badac2fa9f0f732adec73765861ff6..5ffcdde00b414df0db119575913f15ca57c16eef 100644 (file)
@@ -1961,8 +1961,13 @@ static int load_module(void)
        char *jabber_loaded = ast_module_helper("", "res_jabber.so", 0, 0, 0, 0);
        free(jabber_loaded);
        if (!jabber_loaded) {
-               ast_log(LOG_ERROR, "chan_gtalk.so depends upon res_jabber.so\n");
-               return AST_MODULE_LOAD_DECLINE;
+               /* If embedded, check for a different module name */
+               jabber_loaded = ast_module_helper("", "res_jabber", 0, 0, 0, 0);
+               free(jabber_loaded);
+               if (!jabber_loaded) {
+                       ast_log(LOG_ERROR, "chan_gtalk.so depends upon res_jabber.so\n");
+                       return AST_MODULE_LOAD_DECLINE;
+               }
        }
 
 #ifdef HAVE_GNUTLS