On Saturday 30 September 2006 20:34, Juha Heinanen wrote: > dan, > > as an author of domain module, i have a couple of questions: > > - why didn't you remove is_uri_host_local() and is_from_local() > functions? i don't like adding stuff without getting rid of > redundant code.
Because I didn't want to make such drastic changes to code I didn't write, considering that this is your call to make. I merely fixed the function I previously wrote to behave more in line with the new pseudo variable and AVP notation specs in 1.1.x. Besides I remember you have adverse reactions to code which you consider to introduce performance issues, and clearly is_domain_local is somewhat slower than the other 2, given it has to parse AVP specs. So I had no idea if you wanted to preserve them old functions for performance reasons or not. As I said, it is not my call to make, this commit was merely a fix to existing code not a module revamping. That being said, if you ask me, then yes I agree that we do not need to keep the old functions around now that there is a completely generic way to check for local domains and I also do not believe that the performance penalty the AVP parsing introduces is worth worrying about. > > - in w_is_domain_local, why do you use xl_printf_s to get the domain > instead of (i would assume) faster xl_get_spec_value? Mainly because I didn't know about the latter. Feel free to replace it as long as you think it's better and it doesn't change the behavior. xl_printf_s however allows you to combine several elements. I don't know if this behavior can be helpful in some cases, but it would be an argument in deciding between the 2. -- Dan _______________________________________________ Devel mailing list [email protected] http://openser.org/cgi-bin/mailman/listinfo/devel
