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
This commit is contained in:
Tilghman Lesher
2008-04-28 04:47:39 +00:00
parent eb8e9d5dc5
commit a4732cfb3c
2 changed files with 14 additions and 4 deletions

View File

@@ -7933,8 +7933,13 @@ static int load_module(void)
char *adsi_loaded = ast_module_helper("", "res_adsi.so", 0, 0, 0, 0); char *adsi_loaded = ast_module_helper("", "res_adsi.so", 0, 0, 0, 0);
free(adsi_loaded); free(adsi_loaded);
if (!adsi_loaded) { if (!adsi_loaded) {
ast_log(LOG_ERROR, "app_voicemail.so depends upon res_adsi.so\n"); /* If embedded, res_adsi may be known as "res_adsi" not "res_adsi.so" */
return AST_MODULE_LOAD_DECLINE; 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); my_umask = umask(0);

View File

@@ -1961,8 +1961,13 @@ static int load_module(void)
char *jabber_loaded = ast_module_helper("", "res_jabber.so", 0, 0, 0, 0); char *jabber_loaded = ast_module_helper("", "res_jabber.so", 0, 0, 0, 0);
free(jabber_loaded); free(jabber_loaded);
if (!jabber_loaded) { if (!jabber_loaded) {
ast_log(LOG_ERROR, "chan_gtalk.so depends upon res_jabber.so\n"); /* If embedded, check for a different module name */
return AST_MODULE_LOAD_DECLINE; 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 #ifdef HAVE_GNUTLS