Commit 72db2b73 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Add a little debugging

parent cdb5244e
......@@ -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;
}
......
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment