From: Kurt Zeilenga Date: Mon, 15 May 2000 21:47:58 +0000 (+0000) Subject: SLAPD_SCHEMA_NOT_COMPAT: implement attr_merge() X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2963 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=19becc614f0d9a8724b0e51d37b3b9ee69c7ad58;p=openldap SLAPD_SCHEMA_NOT_COMPAT: implement attr_merge() --- diff --git a/servers/slapd/attr.c b/servers/slapd/attr.c index 0b19c8b3ea..ff82d744d4 100644 --- a/servers/slapd/attr.c +++ b/servers/slapd/attr.c @@ -189,18 +189,19 @@ attr_merge( for ( a = &e->e_attrs; *a != NULL; a = &(*a)->a_next ) { #ifdef SLAPD_SCHEMA_NOT_COMPAT - /* not yet implemented */ + if ( ad_cmp( (*a)->a_desc, desc ) == 0 ) #else - if ( strcasecmp( (*a)->a_type, type ) == 0 ) { + if ( strcasecmp( (*a)->a_type, type ) == 0 ) +#endif + { break; } -#endif } if ( *a == NULL ) { *a = (Attribute *) ch_malloc( sizeof(Attribute) ); #ifdef SLAPD_SCHEMA_NOT_COMPAT - /* not yet implemented */ + (*a)->a_desc = ad_dup( desc ); #else (*a)->a_type = attr_normalize( ch_strdup( type ) ); (*a)->a_syntax = attr_syntax( type ); @@ -284,12 +285,13 @@ attr_delete( for ( a = attrs; *a != NULL; a = &(*a)->a_next ) { #ifdef SLAPD_SCHEMA_NOT_COMPAT - /* not yet implemented */ + if ( ad_cmp( (*a)->a_desc, desc ) == 0 ) #else - if ( strcasecmp( (*a)->a_type, type ) == 0 ) { + if ( strcasecmp( (*a)->a_type, type ) == 0 ) +#endif + { break; } -#endif } if ( *a == NULL ) {