On 18/01/07, Thomas Anders <[EMAIL PROTECTED]> wrote:
I don't think this patch is complete or would build as-is. Don't we need
the attached one at least?

Probably, yes.
My patch was solely intended as an indication of the sort of thing I
had in mind.  It wasn't fully-tested or anything.



1) Can you post your proposed patch for the dropauth/SyslogTrap
integers, please?

If you really think it's necessary.
Appended.
(OK - it's not quite as simple as exchanging "int" and "extern int",
but it's not far off!)


2) What patch should go into 5.4.x?

None.
Unpicking the library layering problem is too great a change to do mid-branch.
This is something to aim for in 5.5, IMO.

Dave
Index: snmptrapd.c
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/apps/snmptrapd.c,v
retrieving revision 5.79
diff -u -r5.79 snmptrapd.c
--- snmptrapd.c	22 Nov 2006 12:58:20 -0000	5.79
+++ snmptrapd.c	18 Jan 2007 11:00:21 -0000
@@ -137,9 +137,9 @@
 #endif
 
 char           *logfile = 0;
-int             SyslogTrap = 0;
+extern int      SyslogTrap = 0;
 int             Event = 0;
-int             dropauth = 0;
+extern int      dropauth = 0;
 int             reconfig = 0;
 char            ddefault_port[] = "udp:162";	/* Default default port */
 char           *default_port = ddefault_port;
Index: snmptrapd_handlers.c
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/apps/snmptrapd_handlers.c,v
retrieving revision 5.39
diff -u -r5.39 snmptrapd_handlers.c
--- snmptrapd_handlers.c	15 Oct 2006 21:44:14 -0000	5.39
+++ snmptrapd_handlers.c	18 Jan 2007 11:00:21 -0000
@@ -42,6 +42,9 @@
 char *print_format1  = NULL;
 char *print_format2  = NULL;
 
+int   SyslogTrap;
+int   dropauth;
+
 const char     *trap1_std_str = "%.4y-%.2m-%.2l %.2h:%.2j:%.2k %B [%b] (via %A [%a]): %N\n\t%W Trap (%q) Uptime: %#T\n%v\n";
 const char     *trap2_std_str = "%.4y-%.2m-%.2l %.2h:%.2j:%.2k %B [%b]:\n%v\n";
 
@@ -562,7 +565,6 @@
     u_char         *rbuf = NULL;
     size_t          r_len = 64, o_len = 0;
     int             trunc = 0;
-    extern int      SyslogTrap;
 
     DEBUGMSGTL(( "snmptrapd", "syslog_handler\n"));
 
@@ -645,7 +647,6 @@
     u_char         *rbuf = NULL;
     size_t          r_len = 64, o_len = 0;
     int             trunc = 0;
-    extern int      dropauth;
 
     DEBUGMSGTL(( "snmptrapd", "print_handler\n"));
 
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to