Annotation of 43BSDReno/contrib/isode-beta/dsap/common/entry.c, revision 1.1.1.1

1.1       root        1: /* entry.c - */
                      2: 
                      3: #ifndef lint
                      4: static char *rcsid = "$Header: /f/osi/quipu/RCS/entry.c,v 7.0 89/11/23 22:17:30 mrose Rel $";
                      5: #endif
                      6: 
                      7: /*
                      8:  * $Header: /f/osi/quipu/RCS/entry.c,v 7.0 89/11/23 22:17:30 mrose Rel $
                      9:  *
                     10:  *
                     11:  * $Log:       entry.c,v $
                     12:  * Revision 7.0  89/11/23  22:17:30  mrose
                     13:  * Release 6.0
                     14:  * 
                     15:  */
                     16: 
                     17: /*
                     18:  *                                NOTICE
                     19:  *
                     20:  *    Acquisition, use, and distribution of this module and related
                     21:  *    materials are subject to the restrictions of a license agreement.
                     22:  *    Consult the Preface in the User's Manual for the full terms of
                     23:  *    this agreement.
                     24:  *
                     25:  */
                     26: 
                     27: 
                     28: #include "quipu/util.h"
                     29: #include "quipu/entry.h"
                     30: 
                     31: oid_table_attr * tab_objectclass;
                     32: oid_table_attr * tab_alias;
                     33: AttributeType at_objectclass;
                     34: 
                     35: directory_free (directory)
                     36: Entry directory;
                     37: {
                     38: Entry ptr;
                     39: Entry next;
                     40: 
                     41:        if (directory !=  NULLENTRY)
                     42:                for ( ptr = directory; ptr !=  NULLENTRY; ptr = next ) {
                     43:                        next = ptr->e_sibling;
                     44:                        directory_free (ptr->e_child);
                     45:                        entry_free (ptr);
                     46:                }
                     47: }
                     48: 
                     49: entry_free (entryptr)
                     50: Entry entryptr;
                     51: {
                     52:        rdn_free (entryptr->e_name);
                     53:        as_free (entryptr->e_attributes);
                     54: 
                     55:        if (entryptr->e_edbversion !=  NULLCP )
                     56:                free (entryptr->e_edbversion);
                     57: 
                     58:        if (entryptr->e_dsainfo != NULLDSA)
                     59:                free ((char *) entryptr->e_dsainfo);
                     60: 
                     61:        free ((char *) entryptr);
                     62: }
                     63: 
                     64: 
                     65: Entry entry_cpy (entryptr)
                     66: register Entry entryptr;
                     67: {
                     68: register Entry ptr;
                     69: 
                     70:        if (entryptr == NULLENTRY)
                     71:                return (NULLENTRY);
                     72: 
                     73:        ptr = get_default_entry (entryptr->e_parent);
                     74:        ptr->e_name = rdn_cpy (entryptr->e_name);
                     75:        ptr->e_attributes = as_cpy (entryptr->e_attributes);
                     76:        if (entryptr->e_edbversion != NULLCP)
                     77:                ptr->e_edbversion = strdup (entryptr->e_edbversion);
                     78:        else
                     79:                ptr->e_edbversion = NULLCP;
                     80:        ptr->e_sibling = entryptr->e_sibling;
                     81:        ptr->e_child = entryptr->e_child;
                     82:        ptr->e_leaf  = entryptr->e_leaf;
                     83:        ptr->e_complete = entryptr->e_complete;
                     84:        ptr->e_data = entryptr->e_data;
                     85:        ptr->e_lock = entryptr->e_lock;
                     86:        ptr->e_allchildrenpresent = entryptr->e_allchildrenpresent;
                     87: 
                     88:        /* rest must be set by calling unravel_attributes */
                     89:        return (ptr);
                     90: }
                     91: 
                     92: 
                     93: Entry get_default_entry (parent)
                     94: Entry parent;
                     95: {
                     96: register Entry eptr;
                     97: 
                     98:        eptr = entry_alloc();
                     99:        eptr->e_leaf = TRUE;
                    100:        eptr->e_complete = TRUE;
                    101:        eptr->e_data = E_DATA_MASTER;
                    102:        eptr->e_parent  = parent;
                    103:        return (eptr);
                    104: }
                    105: 
                    106: 
                    107: check_known_oids ()
                    108: {
                    109:        /* for efficiency yacc has knowledge of certain oid built in
                    110:                   check these are in current table  */
                    111: 
                    112:        at_objectclass = AttrT_new (OBJECTCLASS_OID);
                    113:        if (at_objectclass == NULLAttrT)
                    114:                fatal (-29,"objectClass attribute type missing - check oidtables");
                    115:        tab_objectclass = at_objectclass;
                    116: 
                    117:        if ( (tab_alias = name2attr (ALIAS_OID)) == NULLTABLE_ATTR)
                    118:                fatal (-30,"alias attribute type missing - check oidtables");
                    119: 
                    120: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.