mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
Added at_ooficial_type() for uniform naming of index files.
This commit is contained in:
parent
3cfd58eed8
commit
c8fac1864c
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user