On Wed, 9 Aug 2006 10:00:20 +0100 Dave wrote:
DS> >                                                             Bad asn
DS> > builds really really shouldn't happen, and iirc, there is no useful error
DS> > message logged when it does happen
DS> 
DS> So why not just log an error?
DS> Raising an assertion means that the agent crashes out completely.
DS> 
DS> The man page for "assert" says:
DS>       The  purpose  of this macro is to help the programmer find bugs in
DS> his program.  The  message  "assertion  failed  in  file  foo.c,  function
DS>        do_bar(), line 1287" is of no help at all to a user.
DS> 
DS> I'm not convinced that assertions are appropriate for released code.
DS> Log errors, yes - but don't force a crash.

But it wasn't an assert, it was a netsnmp_assert. And if you look up the
definition of that macro (library/snmp_assert.h), it will only log a message by
default. The assert (segfault) will only happen if explicity enabled. There's
not even a configure flag to enable it, it has to be manually added or
explicity set in CFLAGS.

If the logging caused a problem, then that's a bug that should be fixed.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to