From: Kurt Zeilenga Date: Fri, 19 May 2000 02:44:47 +0000 (+0000) Subject: Add a little debugging X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2914 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=72db2b73dcc7a8e99fe2c76eb321f10037af53e2;p=openldap Add a little debugging --- diff --git a/servers/slapd/attr.c b/servers/slapd/attr.c index e1d273c552..dd1d3b612e 100644 --- a/servers/slapd/attr.c +++ b/servers/slapd/attr.c @@ -130,7 +130,7 @@ attr_normalize( char *s ) */ #ifdef SLAPD_SCHEMA_NOT_COMPAT - /* not yet implemented */ + /* not used */ #else int attr_merge_fast( @@ -145,23 +145,17 @@ attr_merge_fast( { if ( *a == NULL ) { for ( *a = &e->e_attrs; **a != NULL; *a = &(**a)->a_next ) { -#ifdef SLAPD_SCHEMA_NOT_COMPAT - /* not yet implemented */ -#else if ( strcasecmp( (**a)->a_type, type ) == 0 ) { break; } -#endif } } if ( **a == NULL ) { **a = (Attribute *) ch_malloc( sizeof(Attribute) ); (**a)->a_vals = NULL; -#ifndef SLAPD_SCHEMA_NOT_COMPAT (**a)->a_type = attr_normalize( ch_strdup( type ) ); (**a)->a_syntax = attr_syntax( type ); -#endif (**a)->a_next = NULL; } diff --git a/servers/slapd/oc.c b/servers/slapd/oc.c index 513ba903e3..1d03e67f28 100644 --- a/servers/slapd/oc.c +++ b/servers/slapd/oc.c @@ -28,8 +28,11 @@ int is_entry_objectclass( static const char *objectClass = "objectclass"; #endif - if( e == NULL || oc == NULL || *oc == '\0' ) + assert(!( e == NULL || oc == NULL || *oc == '\0' )); + + if( e == NULL || oc == NULL || *oc == '\0' ) { return 0; + } /* * find objectClass attribute @@ -38,6 +41,10 @@ int is_entry_objectclass( if( attr == NULL ) { /* no objectClass attribute */ + Debug( LDAP_DEBUG_ANY, "is_entry_objectclass(\"%s\", \"%s\") " + "no objectClass attribute\n", + e->e_dn == NULL ? "" : e->e_dn, oc, 0 ); + return 0; }