On 3 September 2010 17:48, Robert Story <rst...@freesnmp.com> wrote:
> On Fri, 03 Sep 2010 09:17:29 -0700 Wes wrote:
> WH> I'm actually wondering why we're not doing a full strcasecmp and why
> WH> we're using the 'n' version?  Robert?
>
> good question.. I think that I initially only had the 'i' test there, and
> someone else added the 'n' version... I recall that Dave was making some
> changes to include processing a while back...  Dave?

Ummm...  trying to remember....
As I recall:

   - the initial code just looked for the config token "include" and
      ignored everything else.   Hence it used an exact 'strcmp' comparison.

  -  my re-working looked for  "includeDir", "includeFile" and "includeSearch"
      (plus the original "include"), and hence uses a prefix search (strncmp)
      as an initial filter

I must admit that I'd forgotten about the possibility of other config tokens
that started with the prefix "include".   Those should really be passed on to
the appropriate MIB module config handlers.

I haven't had a chance to test this, but my suspicion is that dropping the
block that warns about an "unknown include token" should be sufficient
here.   That's probably safer (at least in the long run) than hardcoding an
exception for "includeAllDisks".   We've no idea what other "includeXxx"
config tokens may have been defined in other (user) code.

Dave

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to