From c5c91399abf7e0554c1330177bf0438612c66e76 Mon Sep 17 00:00:00 2001 From: Juan Gomez Date: Wed, 26 May 1999 11:54:39 +0000 Subject: [PATCH] Again mirroring LDAMP_MOD_SOFTADD changes.... --- servers/slapd/back-bdb2/modify.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 ) { -- 2.39.5