From: Tilghman Lesher Date: Mon, 28 Apr 2008 04:47:39 +0000 (+0000) Subject: When modules are embedded, they take on a different name, without the ".so" X-Git-Tag: 1.4.20-rc1~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4732cfb3c51b054d893bf4510afbc974a00177a;p=thirdparty%2Fasterisk.git When modules are embedded, they take on a different name, without the ".so" 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 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 3a285063d6..8118a49e01 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -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); diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c index 2dc56035e5..5ffcdde00b 100644 --- a/channels/chan_gtalk.c +++ b/channels/chan_gtalk.c @@ -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