]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/controls.c
Use recursive mutex to avoid deadlocks
[openldap] / servers / slapd / controls.c
index 5d9d73f4123a509b18a9a05c52ed01f33c8f3b79..26e2461515939dc580e2309ae1f4929c81475776 100644 (file)
@@ -420,7 +420,7 @@ get_supported_controls(char ***ctrloidsp,
        }
        masks = (slap_mask_t *)SLAP_MALLOC( (n + 1) * sizeof(slap_mask_t) );
        if  ( masks == NULL ) {
-               ch_free( oids );
+               SLAP_FREE( oids );
                return LDAP_NO_MEMORY;
        }
 
@@ -492,9 +492,11 @@ slap_global_control( Operation *op, const char *oid, int *cid )
                return LDAP_COMPARE_TRUE;
        }
 
+#if 0
        Debug( LDAP_DEBUG_TRACE,
                "slap_global_control: unavailable control: %s\n",      
                oid, 0, 0 );
+#endif
 
        return LDAP_COMPARE_FALSE;
 }
@@ -1208,10 +1210,12 @@ static int parsePreRead (
                return LDAP_PROTOCOL_ERROR;
        }
 
+#ifdef LDAP_X_TXN
        if ( op->o_txnSpec ) { /* temporary limitation */
                rs->sr_text = "cannot perform pre-read in transaction";
                return LDAP_UNWILLING_TO_PERFORM;
        }
+#endif
 
        ber = ber_init( &(ctrl->ldctl_value) );
        if (ber == NULL) {
@@ -1271,10 +1275,12 @@ static int parsePostRead (
                return LDAP_PROTOCOL_ERROR;
        }
 
+#ifdef LDAP_X_TXN
        if ( op->o_txnSpec ) { /* temporary limitation */
                rs->sr_text = "cannot perform post-read in transaction";
                return LDAP_UNWILLING_TO_PERFORM;
        }
+#endif
 
        ber = ber_init( &(ctrl->ldctl_value) );
        if (ber == NULL) {