Control cleanup

This commit is contained in:
Kurt Zeilenga 2005-05-13 02:34:16 +00:00
parent 55585110bf
commit cfb3f81582
2 changed files with 7 additions and 3 deletions

View 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;

View 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 );
}