From: Juan Gomez Date: Wed, 26 May 1999 11:45:17 +0000 (+0000) Subject: Added support for LDAP_MOD_SOFTADD. X-Git-Tag: OPENLDAP_REL_ENG_2_BP~543 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=03740bd1f48b27942647afdf3351210e65cf8a35;p=openldap Added support for LDAP_MOD_SOFTADD. --- diff --git a/servers/slapd/back-ldbm/modify.c b/servers/slapd/back-ldbm/modify.c index 4000c1f8ae..e9460b1a20 100644 --- a/servers/slapd/back-ldbm/modify.c +++ b/servers/slapd/back-ldbm/modify.c @@ -144,6 +144,20 @@ int ldbm_modify_internal( case LDAP_MOD_REPLACE: err = 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 = 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 ) {