On Wed, 06 Oct 2004 10:12:20 +0100 Dave wrote:
DS> So the full code for a watched writable scalar helper would be:
DS>
DS> netsnmp_set_request_error( reqinfo, request,
DS> SNMP_ERR_WRONGVALUE );
DS> return SNMP_ERR_WRONGVALUE;
I'm not sure about that second part. I think that a handler should only return
an error the handler itself encountered an error. If it's an error in the
request, the request error should be set, but the handler should continue to
return SNMP_ERR_NOERROR. At least that's my understanding of it.
Looking at handle_var_requests, an error in a vb will override the hander
return value anyway.
The confusion isn't helped by the lack of documentation. netsnmp_call_handler
has the comment:
/*
* XXX: define acceptable return statuses
*/
Which, of course, was never done. The inconsistency and mixing of function
errors and snmp errors has long been a thorn in my side. But I don't think
we'll ever get rid of it.
--
Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/>
<irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>
You are lost in a twisty maze of little standards, all different.
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders