Move optimistic ret setting

This commit is contained in:
Kurt Zeilenga 2001-01-17 02:48:55 +00:00
parent 8a22a0e0d0
commit abb0797358

View file

@ -52,8 +52,6 @@ entry_schema_check(
return LDAP_OBJECT_CLASS_VIOLATION;
}
ret = LDAP_SUCCESS;
/* check that the entry has required attrs for each oc */
for ( i = 0; aoc->a_vals[i] != NULL; i++ ) {
if ( (oc = oc_find( aoc->a_vals[i]->bv_val )) == NULL ) {
@ -99,6 +97,9 @@ entry_schema_check(
return LDAP_SUCCESS;
}
/* optimistic */
ret = LDAP_SUCCESS;
/* check that each attr in the entry is allowed by some oc */
for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
ret = oc_check_allowed( a->a_desc->ad_type, aoc->a_vals );