[asterisk-commits] branch group/new_loader_completion r29516 - /team/group/new_loader_completion...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon May 22 13:30:09 MST 2006


Author: kpfleming
Date: Mon May 22 15:30:08 2006
New Revision: 29516

URL: http://svn.digium.com/view/asterisk?rev=29516&view=rev
Log:
fix up res_snmp build, not that it doesn't export any conflicting symbols

Modified:
    team/group/new_loader_completion/res/Makefile
    team/group/new_loader_completion/res/res_snmp.c

Modified: team/group/new_loader_completion/res/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/res/Makefile?rev=29516&r1=29515&r2=29516&view=diff
==============================================================================
--- team/group/new_loader_completion/res/Makefile (original)
+++ team/group/new_loader_completion/res/Makefile Mon May 22 15:30:08 2006
@@ -15,17 +15,6 @@
 
 ifeq ($(OSARCH),FreeBSD)
   MODS:=$(filter-out $(shell if test ${BSDVERSION} -lt 500000 ; then echo "res_config_odbc.so"; fi),$(MODS))
-endif
-
-# NETsnmp has some difficulties on some platforms (conflict with unload_module)
-# Until we figure out if the collission is version-specific or what to do
-# we have disabled res_snmp on OS/X and *BSD
-ifeq ($(OSARCH),Darwin)
-  MODS:=$(filter-out res_snmp.so,$(MODS))
-else
-  ifeq ($(findstring BSD,$(OSARCH)),BSD)
-    MODS:=$(filter-out res_snmp.so,$(MODS))
-  endif
 endif
 
 ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/net-snmp/net-snmp-config.h),)
@@ -88,7 +77,7 @@
 	$(CC) -c -o $@ $(CFLAGS) $(ODBC_INCLUDE) $<
 
 res_snmp.so: res_snmp.o snmp/agent.o
-	$(CC) $(SOLINK) $(SNMP_LDFLAGS) -o $@ $^ snmp/agent.o $(SNMP_LDLIBS)
+	$(CC) $(SOLINK) $(SNMP_LDFLAGS) -o $@ $^ $(SNMP_LDLIBS)
 
 res_config_pgsql.so: res_config_pgsql.o
 	$(CC) $(SOLINK) -o $@ $^ $(PGSQL_LIB)

Modified: team/group/new_loader_completion/res/res_snmp.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/res/res_snmp.c?rev=29516&r1=29515&r2=29516&view=diff
==============================================================================
--- team/group/new_loader_completion/res/res_snmp.c (original)
+++ team/group/new_loader_completion/res/res_snmp.c Mon May 22 15:30:08 2006
@@ -13,10 +13,6 @@
  *
  * \author Thorsten Lockert <tholo at voop.as>
  */
-
-/*** MODULEINFO
-	<defaultenabled>no</defaultenabled>
- ***/
 
 #include "asterisk.h"
 
@@ -89,7 +85,7 @@
     return 0;
 }
 
-int load_module(void)
+static int load_module(void)
 {
     load_config();
 
@@ -102,7 +98,7 @@
 		return 0;
 }
 
-int unload_module(void)
+static int unload_module(void)
 {
     ast_verbose(VERBOSE_PREFIX_1 "Unloading [Sub]Agent Module\n");
 
@@ -110,7 +106,7 @@
     return pthread_join(thread, NULL);
 }
 
-int reload(void)
+static int reload(void)
 {
     ast_verbose(VERBOSE_PREFIX_1 "Reloading [Sub]Agent Module\n");
 
@@ -127,4 +123,8 @@
 		return 0;
 }
 
-AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, MODULE_DESCRIPTION);
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, MODULE_DESCRIPTION,
+		.load = load_module,
+		.unload = unload_module,
+		.reload = reload,
+		);



More information about the asterisk-commits mailing list