]> git.sur5r.net Git - openldap/commitdiff
ITS#3583
authorKurt Zeilenga <kurt@openldap.org>
Wed, 23 Feb 2005 16:08:11 +0000 (16:08 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 23 Feb 2005 16:08:11 +0000 (16:08 +0000)
servers/slapd/controls.c

index f67c7e8f81448aed7499a05ff036d4a0be5c7eaa..7b1604468369bcb9d44e59409d36207386e2b794 100644 (file)
@@ -1191,8 +1191,8 @@ static int parseSubentries (
 
        /* FIXME: should use BER library */
        if( ( ctrl->ldctl_value.bv_len != 3 )
-               && ( ctrl->ldctl_value.bv_val[0] != 0x01 )
-               && ( ctrl->ldctl_value.bv_val[1] != 0x01 ))
+               || ( ctrl->ldctl_value.bv_val[0] != 0x01 )
+               || ( ctrl->ldctl_value.bv_val[1] != 0x01 ))
        {
                rs->sr_text = "subentries control value encoding is bogus";
                return LDAP_PROTOCOL_ERROR;
@@ -1202,8 +1202,9 @@ static int parseSubentries (
                ? SLAP_CONTROL_CRITICAL
                : SLAP_CONTROL_NONCRITICAL;
 
-       if ( (void *)(ctrl->ldctl_value.bv_val[2] != 0x00))
+       if ( (void *)(ctrl->ldctl_value.bv_val[2] != 0x00)) {
                set_subentries_visibility( op );
+       }
 
        return LDAP_SUCCESS;
 }