]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/controls.c
gracefully handle server down while initiating a search (ITS#4518)
[openldap] / servers / slapd / controls.c
index 4592ee2aae20b0e304bb37e99083748669bc05b3..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;
        }
 
@@ -1210,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) {
@@ -1273,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) {