From: Pierangelo Masarati Date: Fri, 4 Nov 2005 20:00:03 +0000 (+0000) Subject: reverse previous commit X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~94 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=29dfcec86640d16d841ab112a3b61b839ac4fa80;p=openldap reverse previous commit --- diff --git a/servers/slapd/back-bdb/add.c b/servers/slapd/back-bdb/add.c index 8455a28bca..a7273ef7c7 100644 --- a/servers/slapd/back-bdb/add.c +++ b/servers/slapd/back-bdb/add.c @@ -388,7 +388,13 @@ retry: /* transaction retry */ struct berval nrdn; Entry *e = entry_dup( op->ora_e ); - dnRdn( &e->e_nname, &nrdn ); + /* pick the RDN if not suffix; otherwise pick the entire DN */ + if (pdn.bv_len) { + nrdn.bv_val = e->e_nname.bv_val; + nrdn.bv_len = pdn.bv_val - op->ora_e->e_nname.bv_val - 1; + } else { + nrdn = e->e_nname; + } bdb_cache_add( bdb, ei, e, &nrdn, locker );