]> git.sur5r.net Git - openldap/commitdiff
fix control value presence
authorPierangelo Masarati <ando@openldap.org>
Tue, 21 Aug 2007 14:50:32 +0000 (14:50 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 21 Aug 2007 14:50:32 +0000 (14:50 +0000)
servers/slapd/controls.c

index ea2ecba0ec2edea11f055924a6459c27ad792789..7e98665d3f56c8711c3fa68c5844caac59b653ac 100644 (file)
@@ -1012,7 +1012,7 @@ static int parseNoOp (
                return LDAP_PROTOCOL_ERROR;
        }
 
-       if ( ctrl->ldctl_value.bv_len ) {
+       if ( !BER_BVISNULL( &ctrl->ldctl_value ) ) {
                rs->sr_text = "noop control value not empty";
                return LDAP_PROTOCOL_ERROR;
        }
@@ -1515,7 +1515,7 @@ static int parseTreeDelete (
                return LDAP_PROTOCOL_ERROR;
        }
 
-       if ( BER_BVISNULL( &ctrl->ldctl_value )) {
+       if ( !BER_BVISNULL( &ctrl->ldctl_value )) {
                rs->sr_text = "treeDelete control value not absent";
                return LDAP_PROTOCOL_ERROR;
        }