Fix handling of non-critical controls for backends which

support no controls.
This commit is contained in:
Kurt Zeilenga 2002-09-24 18:20:59 +00:00
parent 5aa29206cd
commit bbbf2f4ca7
2 changed files with 7 additions and 12 deletions

View File

@ -125,13 +125,15 @@ ldap_charray_inlist(
{
int i;
for ( i = 0; a[i] != NULL; i++ ) {
if( a == NULL ) return 0;
for ( i=0; a[i] != NULL; i++ ) {
if ( strcasecmp( s, a[i] ) == 0 ) {
return( 1 );
return 1;
}
}
return( 0 );
return 0;
}
char **

View File

@ -736,16 +736,9 @@ backend_check_controls(
Operation *op,
const char **text )
{
LDAPControl **ctrls;
ctrls = op->o_ctrls;
if( ctrls == NULL ) {
return LDAP_SUCCESS;
}
LDAPControl **ctrls = op->o_ctrls;
if ( be->be_controls == NULL ) {
*text = "control unavailable in context";
return LDAP_UNAVAILABLE_CRITICAL_EXTENSION;
}
if( ctrls == NULL ) return LDAP_SUCCESS;
for( ; *ctrls != NULL ; ctrls++ ) {
if( (*ctrls)->ldctl_iscritical &&