In order to fix bug 2941983 (snmpd enables stderr logging if trapsess is configured in snmpd.conf), I'd like to change the signature of snmp_parse_args():
--- snmp_parse_args.c (revision 18006) +++ snmp_parse_args.c (working copy) @@ -195,13 +195,15 @@ /* * This method does the real work for snmp_parse_args. It takes an * extra argument, proxy, and uses this to decide how to handle the lack of - * of a community string. + * of a community string. The logopt argument tells us whether the + * system has handled logging configuration yet. */ int snmp_parse_args(int argc, char **argv, netsnmp_session * session, const char *localOpts, - void (*proc) (int, char *const *, int)) + void (*proc) (int, char *const *, int), + int logopt) { static char *sensitive[4] = { NULL, NULL, NULL, NULL }; int arg, sp = 0, zero_sensitive = 1, testcase = 0; @@ -210,7 +212,6 @@ char *Xpsz = NULL; char *Cpsz = NULL; char Opts[BUF_SIZE]; - int logopt = 0; /* * initialize session to default values The application callers would all pass in 0, and snmpd would pass in 1. That would disable the snmp_enable_stderrlog() call in the case of snmpd (since, of course, snmpd makes its own decisions about logging destinations). My question is: is it sufficient to change all of the callers in the net-snmp source tree, or should I call the function with the new signature snmp_parse_args2() and create a helper snmp_parse_args() that supplies a zero? Thanks, Bill ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders