Added at_ooficial_type() for uniform naming of index files.

This commit is contained in:
Juan Gomez 1999-06-11 20:41:07 +00:00
parent 3cfd58eed8
commit c8fac1864c
2 changed files with 30 additions and 0 deletions

View File

@ -528,6 +528,35 @@ at_add(
return code;
}
char *
at_official_name( char * a_type )
{
AttributeType *atp;
if ( (atp=at_find(a_type)) == NULL ) {
return a_type;
} else if ( atp->sat_names
&& atp->sat_names[0]
&& (*(atp->sat_names[0]) != '\0') ) {
return atp->sat_names[0];
} else if (atp->sat_oid && (*atp->sat_oid != '\0')) {
return atp->sat_oid;
} else {
return a_type;
}
}/* char * at_official_name() */
#if defined( SLAPD_SCHEMA_DN )
int

View File

@ -53,6 +53,7 @@ int at_delete_from_list LDAP_P(( int pos, AttributeType ***listp ));
int at_fake_if_needed LDAP_P(( char *name ));
int at_schema_info LDAP_P(( Entry *e ));
int at_add LDAP_P(( LDAP_ATTRIBUTE_TYPE *at, char **err ));
char * at_official_name LDAP_P(( char * a_type ));
/*
* ava.c