From: Juan Gomez Date: Wed, 26 May 1999 11:54:39 +0000 (+0000) Subject: Again mirroring LDAMP_MOD_SOFTADD changes.... X-Git-Tag: OPENLDAP_REL_ENG_2_BP~541 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c5c91399abf7e0554c1330177bf0438612c66e76;p=openldap Again mirroring LDAMP_MOD_SOFTADD changes.... --- diff --git a/servers/slapd/back-bdb2/modify.c b/servers/slapd/back-bdb2/modify.c index 2bd92396d4..fcce9ab635 100644 --- a/servers/slapd/back-bdb2/modify.c +++ b/servers/slapd/back-bdb2/modify.c @@ -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 ) {