[asterisk-commits] trunk r17860 - /trunk/res/res_monitor.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Apr 6 08:10:32 MST 2006


Author: rizzo
Date: Thu Apr  6 10:10:29 2006
New Revision: 17860

URL: http://svn.digium.com/view/asterisk?rev=17860&view=rev
Log:
use the new module interface for this module, but make it
of type MOD_0 as it exports symbols so it should be loaded as RTLD_GLOBAL.


Modified:
    trunk/res/res_monitor.c

Modified: trunk/res/res_monitor.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_monitor.c?rev=17860&r1=17859&r2=17860&view=diff
==============================================================================
--- trunk/res/res_monitor.c (original)
+++ trunk/res/res_monitor.c Thu Apr  6 10:10:29 2006
@@ -30,6 +30,8 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <libgen.h>		/* dirname() */
+
+#define STATIC_MODULE
 
 #include "asterisk.h"
 
@@ -645,7 +647,7 @@
 }
 	
 
-int load_module(void)
+STATIC_MODULE int load_module(void)
 {
 	ast_register_application("Monitor", start_monitor_exec, monitor_synopsis, monitor_descrip);
 	ast_register_application("StopMonitor", stop_monitor_exec, stopmonitor_synopsis, stopmonitor_descrip);
@@ -661,7 +663,7 @@
 	return 0;
 }
 
-int unload_module(void)
+STATIC_MODULE int unload_module(void)
 {
 	ast_unregister_application("Monitor");
 	ast_unregister_application("StopMonitor");
@@ -677,12 +679,12 @@
 	return 0;
 }
 
-char *description(void)
+STATIC_MODULE char *description(void)
 {
 	return "Call Monitoring Resource";
 }
 
-int usecount(void)
+STATIC_MODULE int usecount(void)
 {
 	/* Never allow monitor to be unloaded because it will
 	   unresolve needed symbols in the channel */
@@ -695,7 +697,9 @@
 #endif
 }
 
-char *key()
+STATIC_MODULE char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD(MOD_0, NULL, NULL, NULL);	/* MOD_0 because it exports some symbols */



More information about the asterisk-commits mailing list