diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-28 04:47:39 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-28 04:47:39 +0000 |
commit | 5bfcef0e334d54b1d4778ce86627d420b4d71e33 (patch) | |
tree | bcab3417c5180eb5a8c6bfcbf9d517fe09e16af0 | |
parent | d18d099eb7865c82cca46ff3c1b77b1e2bf81a4a (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@114708 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_voicemail.c | 9 | ||||
-rw-r--r-- | channels/chan_gtalk.c | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 3a285063d..8118a49e0 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 2dc56035e..5ffcdde00 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 |