From e5d48fd45f8ee482da5b379cea44a17e777f3056 Mon Sep 17 00:00:00 2001 From: Luigi Rizzo <rizzo@icir.org> Date: Thu, 6 Apr 2006 15:10:29 +0000 Subject: [PATCH] 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 --- res/res_monitor.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/res/res_monitor.c b/res/res_monitor.c index ce09400541..ae6099b3ec 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 */ -- GitLab