[asterisk-commits] tilghman: branch tilghman/kill_stubs r276443 - in /team/tilghman/kill_stubs: ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 14 15:17:11 CDT 2010


Author: tilghman
Date: Wed Jul 14 15:17:00 2010
New Revision: 276443

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=276443
Log:
Major props to Kevin Fleming, who figured this out.  The module loader won't export symbols, unless you tell it to.

Modified:
    team/tilghman/kill_stubs/include/asterisk/agi.h
    team/tilghman/kill_stubs/include/asterisk/optional_api.h
    team/tilghman/kill_stubs/res/res_adsi.c
    team/tilghman/kill_stubs/res/res_crypto.c

Modified: team/tilghman/kill_stubs/include/asterisk/agi.h
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/kill_stubs/include/asterisk/agi.h?view=diff&rev=276443&r1=276442&r2=276443
==============================================================================
--- team/tilghman/kill_stubs/include/asterisk/agi.h (original)
+++ team/tilghman/kill_stubs/include/asterisk/agi.h Wed Jul 14 15:17:00 2010
@@ -69,8 +69,9 @@
  *
  * \param mod Pointer to the module_info structure for the module that is registering the command
  * \param cmd Pointer to the descriptor for the command
- * \return 1 on success, 0 if the command is already registered
- *
+ * \retval 1 on success
+ * \retval 0 the command is already registered
+ * \retval AST_OPTIONAL_API_UNAVAILABLE the module is not loaded.
  */
 AST_OPTIONAL_API(int, ast_agi_register,
 		 (struct ast_module *mod, agi_command *cmd),

Modified: team/tilghman/kill_stubs/include/asterisk/optional_api.h
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/kill_stubs/include/asterisk/optional_api.h?view=diff&rev=276443&r1=276442&r2=276443
==============================================================================
--- team/tilghman/kill_stubs/include/asterisk/optional_api.h (original)
+++ team/tilghman/kill_stubs/include/asterisk/optional_api.h Wed Jul 14 15:17:00 2010
@@ -80,6 +80,13 @@
  * definition; this means that any consumers of the API functions so
  * defined will require that the provider of the API functions be
  * loaded before they can reference the symbols.
+ *
+ * WARNING WARNING WARNING WARNING WARNING
+ *
+ * You MUST add the AST_MODFLAG_GLOBAL_SYMBOLS to the module for which you
+ * are enabling optional_api functionality, or it will fail to work.
+ *
+ * WARNING WARNING WARNING WARNING WARNING
  */
 
 #define __stringify_1(x)	#x

Modified: team/tilghman/kill_stubs/res/res_adsi.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/kill_stubs/res/res_adsi.c?view=diff&rev=276443&r1=276442&r2=276443
==============================================================================
--- team/tilghman/kill_stubs/res/res_adsi.c (original)
+++ team/tilghman/kill_stubs/res/res_adsi.c Wed Jul 14 15:17:00 2010
@@ -1141,7 +1141,7 @@
 	return -1;
 }
 
-AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "ADSI Resource",
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "ADSI Resource",
 		.load = load_module,
 		.unload = unload_module,
 		.reload = reload,

Modified: team/tilghman/kill_stubs/res/res_crypto.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/kill_stubs/res/res_crypto.c?view=diff&rev=276443&r1=276442&r2=276443
==============================================================================
--- team/tilghman/kill_stubs/res/res_crypto.c (original)
+++ team/tilghman/kill_stubs/res/res_crypto.c Wed Jul 14 15:17:00 2010
@@ -637,9 +637,8 @@
 }
 
 /* needs usecount semantics defined */
-AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Cryptographic Digital Signatures",
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Cryptographic Digital Signatures",
 		.load = load_module,
 		.unload = unload_module,
 		.reload = reload,
-		.load_pri = 20,
 	);




More information about the asterisk-commits mailing list