[sr-dev] git:master: modules/mtree: added new mode to mt_match()

Klaus Darilion klaus.mailinglists at pernau.at
Fri Aug 19 08:43:54 CEST 2011



On 19.08.2011 06:23, Juha Heinanen wrote:
> Klaus Darilion writes:
>>
>> Eagerly I was interested in the mtree module (never used it before) and
>> read the README few times but I'm still not sure if I understand it
>> correctly. IMO the documentation is poor - maybe someone who uses and
>> understand the module can improve the README. I.e. an example might be
>> quite useful.
>
> klaus,
>
> i had the same problem with readme and asked questions about it.
>
>> "This module loads data indexed by prefixes from database and returns
>> associated string or precompiled value."
>>
>> What is a precompiled value?
>
> may be it refers to integer value of type 1 mtrees, which are not
> documented in readme, but which daniel referred to.
>
>> Also it find it strange that "mode" is either 2 or not 2. So, mode=1 is
>> the same as mode=5? Usually it is something like mode=1: ...., mode=2:
>> .....
>
> it seemed to me that modes 0 and 1 (corresponding to types 0 and 1 of
> mtrees) were already "reserved" in the code, although not used.
> therefore i chose mode 2 for the case where values of all matching
> prefixes are added to an an avp.

In mode 2, how are the values added? Will every matching entry be added 
as an AVP so that there is an AVP-Array, or will there be just one AVP, 
with all the values joined together?

Klaus



More information about the sr-dev mailing list