Inheriting contact_name does not work (any more?)

Matthias Eble PsychoTrahe at gmx.de
Wed Jun 3 00:18:49 CEST 2009


Hi List,

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.

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().

Thoughts?

Matthias


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get




More information about the Developers mailing list