Dave> So the full code for a watched writable scalar helper would be:
Dave> 
Dave>                    netsnmp_set_request_error( reqinfo, request,
Dave>                                               SNMP_ERR_WRONGVALUE );
Dave>                    return SNMP_ERR_WRONGVALUE;

Robert> I'm not sure about that second part. I think that a handler should
Robert> only return an error [if] the handler itself encountered an error.
Robert> If it's an error in the request, the request error should be set,
Robert> but the handler should continue to return SNMP_ERR_NOERROR.
Robert> At least that's my understanding of it.

When I asked Wes about this, he said that he'd started by using the
SNMP_ERR_xxx value as the return value from the function, and later
moved to setting this in the request structure.
  When I worked through the code, I got the distinct impression that
the return value was ignored completely.

So that's what I've described in That Bloody Book - suggesting that
the (same) error is returned using both techniques for safety, but
mentioning that the return value is never actually used.

If we're going to change this, then I could really do with knowing
sooner rather than later.

Wes - the handler mechanism is your baby - care to make a ruling?

Dave



-------------------------------------------------------
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

Reply via email to