]> git.sur5r.net Git - openldap/commitdiff
improve verbstomask diagnostics
authorPierangelo Masarati <ando@openldap.org>
Mon, 25 Jul 2005 20:48:24 +0000 (20:48 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 25 Jul 2005 20:48:24 +0000 (20:48 +0000)
servers/slapd/config.c

index 484e8c5a20538a3a6367405716c1906832dff570..a488bdd3d2d8e716877d7302a8b2ce04066314d8 100644 (file)
@@ -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