Hello.

As a result of making the oid's in agent_trap static the function
init_traps have been reduced to

void
init_traps(void)
{
}

so I thought I should try to remove it at some time in the future.

Is the attached patch a good way to do that?
If not then how should one go about removing a public symbol?

On a similar note there are some oid symbols in agent_trap.c that are
unused by us that I do intend to remove. Here the question also is how
to do the removal - my current thought is to just remove them since they
lack a corresponding _len symbol.

/MF
Index: include/net-snmp/agent/agent_trap.h
===================================================================
--- include/net-snmp/agent/agent_trap.h	(revision 17838)
+++ include/net-snmp/agent/agent_trap.h	(working copy)
@@ -10,7 +10,15 @@
     int             confirm;
 };
 
-void            init_traps(void);
+
+/**
+ *  \deprecated
+ *  This is only for backwards compatibility, it got unnecessary once the
+ *  initialization of the oids got static.
+ *  Scheduled for removal in Net-SNMP 5.7
+ */
+#define         init_traps()
+
 void            send_easy_trap(int, int);
 void            send_trap_pdu(netsnmp_pdu *);
 void            send_v2trap(netsnmp_variable_list *);
Index: agent/snmp_vars.c
===================================================================
--- agent/snmp_vars.c	(revision 17838)
+++ agent/snmp_vars.c	(working copy)
@@ -308,7 +308,6 @@
     _init_agent_callback_transport();
     
     netsnmp_init_helpers();
-    init_traps();
     netsnmp_container_init_list();
     init_agent_sysORTable();
 
Index: agent/agent_trap.c
===================================================================
--- agent/agent_trap.c	(revision 17838)
+++ agent/agent_trap.c	(working copy)
@@ -138,6 +138,13 @@
 	 *
 	 *******************/
 
+#undef init_traps
+/**
+ *  \deprecated
+ *  This is only for backwards compatibility, it got unnecessary once the
+ *  initialization of the oids got static.
+ *  Scheduled for removal in Net-SNMP 5.7
+ */
 void
 init_traps(void)
 {
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to