On Tuesday 08 March 2011, Daniel-Constantin Mierla wrote:
thanks for your contributions.
My only question is related to the update to allow_trusted(). Now it
goes through all the records, if I understood it right, while the former
version was returning at the first match.
Correct. But only through the records of
the matching hash table bucket.
Maybe we can have a parameter
to the function to control this behavior, default the backward
compatible way (not to get unexpected behavior due to this change), and
when a specific parameter value is given then have the behavior you
added. What do you think?
I thought about adding a parameter, but then i considered the current
behaviour as buggy, because you can't see if there are multiple matches and
you don't know which of the matching tags is returned.
For most configurations, the behaviour is backwards compatible, the return
value is still positive if there is a match, and the tag is still added to the
avp. The order of added tags was already undefined when there were multiple
matches, it was undefined which tag would have been added to the avp. Now you
get them all.
Nevertheless, adding the parameter was a no-brainer...
--
Greetings,
Alex Hermann