>>>>> On Sat, 24 Jul 2010 20:49:54 +0100, Dave Shield >>>>> <d.t.shi...@liverpool.ac.uk> said:
DS> Firstly, the current include directive specifies DS> the name of a config file, which is searched DS> for in the list of configuration directories. DS> This was slightly counterintuitive to me, as I DS> expected to be able to give the full path of the DS> file to include. There are a number of cases I could see people wanting: 1) "include foo.conf" includes *every* found instance in the config path 2) "include foo.conf" includes only a singular foo.conf I suspect that it would be easiest to make #2 happen if and only if the foo.conf file starts with '/' or './' or '../'. Anything else and it should probably look for every instance. (I forget whether it's possible to do #1 right now; my recollection from a phone conference with Robert was that #1 was actually going to be easier and that's what it's doing now). DS> [As an aside - in order to implement this, I needed to tweak the DS> 'read_config' call to return a success/failure indication, rather DS> than void. In the attached patch, this is done using a new internal DS> '_read_config()' call. It might be cleaner to change the DS> read_config() call itself, though this would change the API DS> slightly. I'm not sure whether this would break existing code, or DS> whether 'read_config' is regarded as part of the main public API (as DS> opposed to the internal public API). Thoughts? DS> ] Changing the api is some what confusing since the returning something that wasn't returned before already won't be checked on in any of the existing code. But new warnings may appear I suppose. DS> The second attachment (NS-includedir.patch), adds support DS> for a new "includedir" directive. This would scan the DS> specified directory, and read in any file of the form "%s.conf". DS> The purpose of this should hopefully be fairly obvious! I like it! -- Wes Hardaker Please mail all replies to net-snmp-coders@lists.sourceforge.net ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders