On Fri, 2005-05-27 at 09:29, Vance Shipley wrote:
> On Fri, May 27, 2005 at 09:13:13AM +0100, Dave Shield wrote:
> }  
> }  Are you *really* that tight on space that a few extra bytes is
> }  going to make a difference?
> 
> The point is that to "handle an error" I need to understand what
> happened and what can be done about it.

You can't necessarily do anything about some errors, except
detect (and possibly report) them.

If netsnmp_extract_table_row_data() can't retrieve the table
row data structure that the table_data handler should have set
up, then this indicates a bug somewhere in the 'table_data'
helper. You can't realistically fix (or even work around) that
bug within your own code.

But neither should a bug in one particular helper bring the
whole agent crashing down.   As a general rule of thumb, you
should never dereference *any* pointer without first testing
that it's valid.
   That's the idea here.


Dave



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to