]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/oc.c
Experimental code that uses one locker ID per thread. Seems to work OK,
[openldap] / servers / slapd / oc.c
index ca7a0d45aa2cb8a7e3c913296ee9b07be807c608..2d7c6ce097274af7dd4b5327a207e25eab7ddd23 100644 (file)
@@ -25,8 +25,14 @@ int is_object_subclass(
        if( sub == NULL || sup == NULL ) return 0;
 
 #if 1
+#ifdef NEW_LOGGING
+       LDAP_LOG ( OPERATION, ARGS, 
+               "is_object_subclass(%s,%s) %d\n",
+               sup->soc_oid, sub->soc_oid, sup == sub );
+#else
        Debug( LDAP_DEBUG_TRACE, "is_object_subclass(%s,%s) %d\n",
                sup->soc_oid, sub->soc_oid, sup == sub );
+#endif
 #endif
 
        if( sup == sub ) {
@@ -72,10 +78,10 @@ int is_entry_objectclass(
        if( attr == NULL ) {
                /* no objectClass attribute */
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "operation", LDAP_LEVEL_ERR, "is_entry_objectclass: "
-                       "dn(%s), oid (%s), no objectClass attribute.\n",
-                       e->e_dn == NULL ? "" : e->e_dn,
-                       oc->soc_oclass.oc_oid ));
+               LDAP_LOG( OPERATION, ERR, 
+                       "is_entry_objectclass: dn(%s), oid (%s), no objectClass "
+                       "attribute.\n", e->e_dn == NULL ? "" : e->e_dn,
+                       oc->soc_oclass.oc_oid, 0 );
 #else
                Debug( LDAP_DEBUG_ANY, "is_entry_objectclass(\"%s\", \"%s\") "
                        "no objectClass attribute\n",
@@ -354,7 +360,7 @@ oc_insert(
                {
                        *err = soc->soc_oid;
                        ldap_memfree(oir);
-                       return SLAP_SCHERR_DUP_CLASS;
+                       return SLAP_SCHERR_CLASS_DUP;
                }
 
                /* FIX: temporal consistency check */
@@ -378,7 +384,7 @@ oc_insert(
                        {
                                *err = *names;
                                ldap_memfree(oir);
-                               return SLAP_SCHERR_DUP_CLASS;
+                               return SLAP_SCHERR_CLASS_DUP;
                        }
 
                        /* FIX: temporal consistency check */
@@ -446,7 +452,7 @@ oc_add(
        code = oc_create_allowed( soc, soc->soc_at_oids_may, &op, err );
        if ( code != 0 ) return code;
 
-       if( user && op ) return SLAP_SCHERR_CLASS_OPERATIONAL;
+       if( user && op ) return SLAP_SCHERR_CLASS_BAD_SUP;
 
        code = oc_insert(soc,err);
        return code;