From 136fe60e0efa116c25fc549d3f7cc02c673d6313 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 25 Jul 2005 20:48:24 +0000 Subject: [PATCH] improve verbstomask diagnostics --- servers/slapd/config.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 484e8c5a20..a488bdd3d2 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -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 -- 2.39.5