On Fri, 2005-05-27 at 01:38, Vance Shipley wrote:
> When should a handler return an error?

It probably doesn't actually matter.
The return value is (currently) unused.

I originally tended to return the same value being set in
the netsnmp_request_set_error call.  Wes (who developed
the handler framework) then suggested this was better
used to indicate whether the handler managed to process
the request "sensibly" or not.

So a logical error (like the index pointers being NULL)
could well return SNMP_ERR_GENERR (as well as setting
this via netsnmp_request_set_error()).   While a "clean"
error (e.g. SNMP_ERR_WRONGTYPE) would use SNMP_ERR_NOERROR
as the return value.


>  If the handler returns other than SNMP_ERR_NOERROR will it
> be called again for the FREE/UNDO phases?

I think so - yes. 
Last time I checked the code, it never actually used this
return value anyway.

Suck it and see.

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