From 72db2b73dcc7a8e99fe2c76eb321f10037af53e2 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 19 May 2000 02:44:47 +0000 Subject: [PATCH] Add a little debugging --- servers/slapd/attr.c | 8 +------- servers/slapd/oc.c | 9 ++++++++- 2 files changed, 9 insertions(+), 8 deletions(-) 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; } -- 2.39.5