>>>>> On Wed, 02 Mar 2011 21:58:37 +0100, Magnus Fromreide 
>>>>> <[email protected]> said:

MF> I have been thinking of an netsnmp_returns_1() that could be used for
MF> situations like this one, but that is just plain ugly.

It's an ugly problem.  And I'm sorry to have been the one that created
it :-)

- We can't depend on inline.
- We can't necessarily depend on the macro being used in a way that is
  safe to replace with a single '1'.
- Thus, having a empty function almost makes sense.  But that's also
  defeating the purpose :-/

Possible solutions:

1) define the return_1 function, put it into a feature itself and have
   the turn-of-stats feature require it.  That means it'll only be
   included if needed.

2) optionally create an additional use_inline or safe_one feature (yes,
   those are bad names) that will revert to the 'inline' or '1'
   definitions if the user selects them because they know it's safe.
   That way we can leave it up to the user, and it'll be a good test of
   the feature system :-/

-- 
Wes Hardaker
Please mail all replies to [email protected]

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to