]> git.sur5r.net Git - openldap/commitdiff
Fix BDB2 (apparently broken before I started adding referrals)
authorKurt Zeilenga <kurt@openldap.org>
Fri, 16 Jul 1999 02:18:03 +0000 (02:18 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 16 Jul 1999 02:18:03 +0000 (02:18 +0000)
servers/slapd/back-bdb2/modify.c
servers/slapd/back-bdb2/modrdn.c
tests/data/slapd-bdb2-ref-slave.conf [new file with mode: 0644]
tests/scripts/defines.sh

index 98f9a8782d4367321e9a422db2283b67df1b15e1..6dee5eeace02004e38859c6d19b59ad914ebecf3 100644 (file)
@@ -188,11 +188,9 @@ bdb2i_back_modify_internal(
 
        send_ldap_result( conn, op, LDAP_SUCCESS,
                NULL, NULL, NULL, NULL );
-       bdb2i_cache_return_entry_w( &li->li_cache, e );
        return( 0 );
 
 error_return:;
-       bdb2i_cache_return_entry_w( &li->li_cache, e );
        return( -1 );
 }
 
@@ -278,6 +276,7 @@ bdb2_back_modify(
        }
 
        ret = bdb2i_back_modify_internal( be, conn, op, dn, modlist, e );
+       bdb2i_cache_return_entry_w( &li->li_cache, e );
 
 done:
        (void) bdb2i_leave_backend_w( lock );
index 97c16ddfe30350c5029e61216f009c023e3ea9be..8054eed2c1a0e681142f2b2c73087cf8ffce501d 100644 (file)
@@ -425,6 +425,7 @@ bdb2i_back_modrdn_internal(
 return_results:
        if( new_dn != NULL ) free( new_dn );
        if( new_ndn != NULL ) free( new_ndn );
+
 return_results_after:
        /* NOTE:
         * new_dn and new_ndn are not deallocated because they are used by
diff --git a/tests/data/slapd-bdb2-ref-slave.conf b/tests/data/slapd-bdb2-ref-slave.conf
new file mode 100644 (file)
index 0000000..1495bfd
--- /dev/null
@@ -0,0 +1,28 @@
+#
+# slave slapd config -- for default referral testing
+#
+include                ./data/slapd.at.conf
+include                ./data/slapd.oc.conf
+schemacheck    off
+pidfile     ./test-repl/slapd.pid
+argsfile    ./test-repl/slapd.args
+
+#######################################################################
+# ldbm database definitions
+#######################################################################
+
+referral       "ldap://localhost:9009/"
+
+backend     bdb2
+home        ./test-db
+
+database       bdb2
+cachesize      0
+suffix         "o=University of Mich, c=US"
+directory      ./test-repl
+rootdn         "cn=Manager, o=University of Mich, c=US"
+rootpw         secret
+index          cn,sn,uid       pres,eq,approx
+index          default         none
+# index                default         pres,eq,approx
+lastmod                on
index a3d12a1e6e0126ef9ded37ce49588a04c34ef110..4f5256e0d23cf19198bbf0d95d41404044b2a32f 100755 (executable)
@@ -8,6 +8,7 @@ if test "$BACKEND" = "bdb2" ; then
        ACLCONF=$DATADIR/slapd-bdb2-acl.conf
        MASTERCONF=$DATADIR/slapd-bdb2-repl-master.conf
        SLAVECONF=$DATADIR/slapd-bdb2-repl-slave.conf
+       REFSLAVECONF=$DATADIR/slapd-bdb2-ref-slave.conf
        TIMING="-t"
 else
        LDIF2LDBM=../servers/slapd/tools/ldif2ldbm