diff options
author | Luigi Rizzo <rizzo@icir.org> | 2006-04-06 15:10:29 +0000 |
---|---|---|
committer | Luigi Rizzo <rizzo@icir.org> | 2006-04-06 15:10:29 +0000 |
commit | e5d48fd45f8ee482da5b379cea44a17e777f3056 (patch) | |
tree | 816bdf4e9b4e14e9cf816691c4e22b91a8979367 /res/res_monitor.c | |
parent | c9834f618717a0d28cb492bc648becb7978eb4c5 (diff) |
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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_monitor.c')
-rw-r--r-- | res/res_monitor.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/res/res_monitor.c b/res/res_monitor.c index ce0940054..ae6099b3e 100644 --- a/res/res_monitor.c +++ b/res/res_monitor.c @@ -31,6 +31,8 @@ #include <sys/stat.h> #include <libgen.h> /* dirname() */ +#define STATIC_MODULE + #include "asterisk.h" ASTERISK_FILE_VERSION(__FILE__, "$Revision$") @@ -645,7 +647,7 @@ static int unpause_monitor_action(struct mansession *s, struct message *m) } -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 @@ int load_module(void) return 0; } -int unload_module(void) +STATIC_MODULE int unload_module(void) { ast_unregister_application("Monitor"); ast_unregister_application("StopMonitor"); @@ -677,12 +679,12 @@ int unload_module(void) 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 @@ int usecount(void) #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 */ |