[asterisk-commits] tilghman: branch 1.4 r114708 - in /branches/1.4: apps/ channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Apr 27 23:47:40 CDT 2008


Author: tilghman
Date: Sun Apr 27 23:47:39 2008
New Revision: 114708

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114708
Log:
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)

Modified:
    branches/1.4/apps/app_voicemail.c
    branches/1.4/channels/chan_gtalk.c

Modified: branches/1.4/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_voicemail.c?view=diff&rev=114708&r1=114707&r2=114708
==============================================================================
--- branches/1.4/apps/app_voicemail.c (original)
+++ branches/1.4/apps/app_voicemail.c Sun Apr 27 23:47:39 2008
@@ -7933,8 +7933,13 @@
 	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);

Modified: branches/1.4/channels/chan_gtalk.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_gtalk.c?view=diff&rev=114708&r1=114707&r2=114708
==============================================================================
--- branches/1.4/channels/chan_gtalk.c (original)
+++ branches/1.4/channels/chan_gtalk.c Sun Apr 27 23:47:39 2008
@@ -1961,8 +1961,13 @@
 	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	




More information about the asterisk-commits mailing list