]> git.sur5r.net Git - openldap/commitdiff
reverse previous commit
authorPierangelo Masarati <ando@openldap.org>
Fri, 4 Nov 2005 20:00:03 +0000 (20:00 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 4 Nov 2005 20:00:03 +0000 (20:00 +0000)
servers/slapd/back-bdb/add.c

index 8455a28bcabc1d19ad97db96c91c666aefcbec85..a7273ef7c7291ee08cd25018b8bbd62c4c97e231 100644 (file)
@@ -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 );