]> git.sur5r.net Git - openldap/commitdiff
Control cleanup
authorKurt Zeilenga <kurt@openldap.org>
Fri, 13 May 2005 02:34:16 +0000 (02:34 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 13 May 2005 02:34:16 +0000 (02:34 +0000)
servers/slapd/backend.c
servers/slapd/controls.c

index f8dda1c50a57c3b23d671a2f4685143a34205f3d..be7c78de3501ef2d608cf5b288100c814243eacc 100644 (file)
@@ -821,8 +821,7 @@ backend_check_controls(
                                break;
 
                        case LDAP_COMPARE_FALSE:
-                               if ( !op->o_bd->be_ctrls[ cid ] && (*ctrls)->ldctl_iscritical )
-                               {
+                               if ( !op->o_bd->be_ctrls[cid] && (*ctrls)->ldctl_iscritical ) {
                                        /* Per RFC 2251 (and LDAPBIS discussions), if the control
                                         * is recognized and appropriate for the operation (which
                                         * we've already verified), then the server should make
@@ -844,6 +843,11 @@ backend_check_controls(
 
                        default:
                                /* unreachable */
+                               Debug( LDAP_DEBUG_ANY,
+                                       "backend_check_controls: unable to check control: %s\n",
+                                       (*ctrls)->ldctl_oid, 0, 0 );
+                               assert( 0 );
+
                                rs->sr_text = "unable to check control";
                                rs->sr_err = LDAP_OTHER;
                                goto done;
index 26f88654f80c2678cf9c92852660f49225e6cf11..252912b22f8f22cd82332ff3fbc8dee769f73125 100644 (file)
@@ -1236,7 +1236,7 @@ static int parseSubentries (
                ? SLAP_CONTROL_CRITICAL
                : SLAP_CONTROL_NONCRITICAL;
 
-       if ( (void *)(ctrl->ldctl_value.bv_val[2] != 0x00)) {
+       if (ctrl->ldctl_value.bv_val[2]) {
                set_subentries_visibility( op );
        }