Inheriting contact_name does not work (any more?)
Ton Voon
ton.voon at opsera.com
Tue Jun 9 22:59:43 CEST 2009
Hi Matthias,
On 2 Jun 2009, at 23:18, Matthias Eble wrote:
> I wanted to use a similar config to this one:
>
> define contact{
> register 0
> use generic-contact
> name foobar-admin
> contact_name foobar
> }
>
> define contact{
> use foobar-admin
> pager +12345
> }
>
> to separate pager/mail addresses into another config file.
> Unfortunately this doesn't work - the second contact definition is
> silently ignored.
>
> I had a look at xodtemplate.c and this shows that even though the
> contact gets correctly added to the global xodtemplate_contact_list,
> it
> is not added to the appropriate skiplist because skiplist_insert() is
> only called when contact_name is directly specified.
>
> However, xodtemplate_resolve_contact() tries to inherit contact_name
> so
> I guess this behaviour was introduced with the skiplists.
I don't see why this shouldn't work.
Can you provide a patch against CVS HEAD, with tests in t/ for this
contact definition.
> A possible solution would be to add the call to skiplist_insert() into
> the resolve function where the inheritance takes place, or to maybe
> entirely move skiplist_insert() calls to
> xodtemplate_end_object_definition().
I'm not sure if adding skip lists later will break anything though.
Ton
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
More information about the Developers
mailing list