]> git.sur5r.net Git - openldap/commitdiff
ITS#3226: Clear attribute flags after schema_check failed
authorRalf Haferkamp <ralf@openldap.org>
Fri, 9 Jul 2004 11:18:42 +0000 (11:18 +0000)
committerRalf Haferkamp <ralf@openldap.org>
Fri, 9 Jul 2004 11:18:42 +0000 (11:18 +0000)
servers/slapd/back-bdb/modify.c

index 772e89bc99e040dedef25b7d74b5ff32566fe4df..45d2efeb11eb9516fd8a87b3a5f4db93d7d5949f 100644 (file)
@@ -266,6 +266,10 @@ int bdb_modify_internal(
        rc = entry_schema_check( op->o_bd, e, save_attrs, text, textbuf, textlen );
        if ( rc != LDAP_SUCCESS || op->o_noop ) {
                attrs_free( e->e_attrs );
+               /* clear the indexing flags */
+               for ( ap = save_attrs; ap != NULL; ap = ap->a_next ) {
+                       ap->a_flags = 0;
+               }
                e->e_attrs = save_attrs;
 
                if ( rc != LDAP_SUCCESS ) {