From: Kurt Zeilenga Date: Wed, 11 Aug 1999 19:05:40 +0000 (+0000) Subject: Modify replace_values not to merge in new values when no value is X-Git-Tag: TWEB_OL_BASE~234 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=49207930cfb0776899bdce04cb235824fcaaf46e;p=openldap Modify replace_values not to merge in new values when no value is was provided. --- diff --git a/servers/slapd/back-bdb2/modify.c b/servers/slapd/back-bdb2/modify.c index 8da3a396ae..ef263e7ed6 100644 --- a/servers/slapd/back-bdb2/modify.c +++ b/servers/slapd/back-bdb2/modify.c @@ -314,7 +314,9 @@ bdb2i_replace_values( { (void) attr_delete( &e->e_attrs, mod->mod_type ); - if ( attr_merge( e, mod->mod_type, mod->mod_bvalues ) != 0 ) { + if ( mod->bvalues != NULL && + attr_merge( e, mod->mod_type, mod->mod_bvalues ) != 0 ) + { return( LDAP_CONSTRAINT_VIOLATION ); } diff --git a/servers/slapd/back-ldbm/modify.c b/servers/slapd/back-ldbm/modify.c index 41197e0513..6f58b94767 100644 --- a/servers/slapd/back-ldbm/modify.c +++ b/servers/slapd/back-ldbm/modify.c @@ -346,7 +346,9 @@ replace_values( { (void) attr_delete( &e->e_attrs, mod->mod_type ); - if ( attr_merge( e, mod->mod_type, mod->mod_bvalues ) != 0 ) { + if ( mod->mod_bvalues != NULL && + attr_merge( e, mod->mod_type, mod->mod_bvalues ) != 0 ) + { return( LDAP_CONSTRAINT_VIOLATION ); }