]> git.sur5r.net Git - openldap/commitdiff
Again mirroring LDAMP_MOD_SOFTADD changes....
authorJuan Gomez <gomez@openldap.org>
Wed, 26 May 1999 11:54:39 +0000 (11:54 +0000)
committerJuan Gomez <gomez@openldap.org>
Wed, 26 May 1999 11:54:39 +0000 (11:54 +0000)
servers/slapd/back-bdb2/modify.c

index 2bd92396d4d0add20de3200d5af04d418f1f5be3..fcce9ab635b82686ec44867ea9b8bf2bd0934898 100644 (file)
@@ -127,6 +127,20 @@ bdb2i_back_modify_internal(
                case LDAP_MOD_REPLACE:
                        err = bdb2i_replace_values( e, mod, op->o_ndn );
                        break;
+               
+               case LDAP_MOD_SOFTADD:
+                       /* Avoid problems in index_add_mods()
+                        * We need to add index if necessary.
+                        */
+                       mod->mod_op = LDAP_MOD_ADD;
+                       if ( (err = bdb2i_add_values( e, mod, op->o_ndn ))
+                               ==  LDAP_TYPE_OR_VALUE_EXISTS ) {
+                               err = LDAP_SUCCESS;
+                               mod->mod_op = LDAP_MOD_SOFTADD;
+                       }
+                       break;
                }
 
                if ( err != LDAP_SUCCESS ) {