]> git.sur5r.net Git - openldap/commitdiff
Change structuralObjectClass to use objectClassMatch,
authorKurt Zeilenga <kurt@openldap.org>
Sat, 9 Feb 2002 23:13:59 +0000 (23:13 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 9 Feb 2002 23:13:59 +0000 (23:13 +0000)
enabling objectclass subclass debugging

servers/slapd/oc.c
servers/slapd/schema_prep.c

index 11a143e95801f88966cffc422a995eb3046bd7e9..e17ccac5b121763b6d1185b491d9fde9ecf69fb4 100644 (file)
@@ -24,7 +24,7 @@ int is_object_subclass(
 
        if( sub == NULL || sup == NULL ) return 0;
 
-#if 0
+#if 1
        Debug( LDAP_DEBUG_TRACE, "is_object_subclass(%s,%s) %d\n",
                sub->soc_oid, sup->soc_oid, sup == sub );
 #endif
index 6deb5e38f516191b77a46a25480f7db0bbe36015..d6940abffb997b40115a480e844967fc88f0f689 100644 (file)
@@ -34,6 +34,17 @@ objectClassMatch(
        ObjectClass *oc = oc_bvfind( value );
        ObjectClass *asserted = oc_bvfind( a );
 
+#if 1
+#ifdef NEW_LOGGING
+       LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
+                  "> objectClassMatch(%s, %s)\n",
+                  value->bv_val, a->bv_val ));
+#else
+       Debug( LDAP_DEBUG_TRACE, "> objectClassMatch(%s,%s)\n",
+               value->bv_val, a->bv_val, 0 );
+#endif
+#endif
+
        if( asserted == NULL ) {
                if( OID_LEADCHAR( *a->bv_val ) ) {
                        /* OID form, return FALSE */
@@ -56,13 +67,13 @@ objectClassMatch(
                *matchp = !is_object_subclass( asserted, oc );
        }
 
-#if 0
+#if 1
 #ifdef NEW_LOGGING
        LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
-                  "objectClassMatch(%s, %s) = %d\n",
+                  "objectClassMatch(%s, %s) = %d\n",
                   value->bv_val, a->bv_val, *matchp ));
 #else
-       Debug( LDAP_DEBUG_TRACE, "objectClassMatch(%s,%s) = %d\n",
+       Debug( LDAP_DEBUG_TRACE, "objectClassMatch(%s,%s) = %d\n",
                value->bv_val, a->bv_val, *matchp );
 #endif
 #endif
@@ -70,6 +81,9 @@ objectClassMatch(
        return LDAP_SUCCESS;
 }
 
+#if 1
+#define structuralObjectClassMatch objectClassMatch
+#else
 static int
 structuralObjectClassMatch(
        int *matchp,
@@ -83,6 +97,17 @@ structuralObjectClassMatch(
        ObjectClass *oc = oc_bvfind( value );
        ObjectClass *asserted = oc_bvfind( a );
 
+#if 1
+#ifdef NEW_LOGGING
+       LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
+                  "> structuralObjectClassMatch(%s, %s)\n",
+                  value->bv_val, a->bv_val ));
+#else
+       Debug( LDAP_DEBUG_TRACE, "> structuralObjectClassMatch(%s,%s)\n",
+               value->bv_val, a->bv_val, 0 );
+#endif
+#endif
+
        if( asserted == NULL ) {
                if( OID_LEADCHAR( *a->bv_val ) ) {
                        /* OID form, return FALSE */
@@ -101,19 +126,20 @@ structuralObjectClassMatch(
 
        *matchp = ( asserted != oc );
 
-#if 0
+#if 1
 #ifdef NEW_LOGGING
        LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
-                  "structuralObjectClassMatch( %s, %s ) = %d\n",
+                  "structuralObjectClassMatch( %s, %s ) = %d\n",
                   value->bv_val, a->bv_val, *matchp ));
 #else
-       Debug( LDAP_DEBUG_TRACE, "structuralObjectClassMatch(%s,%s) = %d\n",
+       Debug( LDAP_DEBUG_TRACE, "structuralObjectClassMatch(%s,%s) = %d\n",
                value->bv_val, a->bv_val, *matchp );
 #endif
 #endif
 
        return LDAP_SUCCESS;
 }
+#endif
 
 static ObjectClassSchemaCheckFN rootDseObjectClass;
 static ObjectClassSchemaCheckFN aliasObjectClass;
@@ -207,8 +233,7 @@ static struct slap_schema_ad_map {
                        "DESC 'RFC2256: object classes of the entity' "
                        "EQUALITY objectIdentifierMatch "
                        "SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 )",
-               NULL, 0,
-               objectClassMatch, NULL, NULL,
+               NULL, 0, objectClassMatch, NULL, NULL,
                offsetof(struct slap_internal_schema, si_ad_objectClass) },
 
        /* user entry operational attributes */