mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
improve verbstomask diagnostics
This commit is contained in:
parent
a91ebfac79
commit
136fe60e0e
@ -850,7 +850,7 @@ slap_verbmasks_append(
|
||||
int i;
|
||||
|
||||
if ( !m ) {
|
||||
return 1;
|
||||
return LDAP_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
for ( i = 0; !BER_BVISNULL( &(*vp)[ i ].word ); i++ ) {
|
||||
@ -869,15 +869,15 @@ slap_verbmasks_append(
|
||||
if ( ( m & (*vp)[ i ].mask ) == (*vp)[ i ].mask ) {
|
||||
if ( ber_bvstrcasecmp( v, &(*vp)[ i ].word ) == 0 ) {
|
||||
/* already set; ignore */
|
||||
return 0;
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
/* conflicts */
|
||||
return 1;
|
||||
return LDAP_TYPE_OR_VALUE_EXISTS;
|
||||
}
|
||||
|
||||
if ( m & (*vp)[ i ].mask ) {
|
||||
/* conflicts */
|
||||
return 1;
|
||||
return LDAP_CONSTRAINT_VIOLATION;
|
||||
}
|
||||
check_next:;
|
||||
}
|
||||
@ -887,7 +887,7 @@ check_next:;
|
||||
*((slap_mask_t *)&(*vp)[ i ].mask) = m;
|
||||
BER_BVZERO( &(*vp)[ i + 1 ].word );
|
||||
|
||||
return 0;
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user