]> git.sur5r.net Git - openldap/commitdiff
Another BDB_HIER redundant modification
authorHoward Chu <hyc@openldap.org>
Thu, 12 Jun 2003 11:17:35 +0000 (11:17 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 12 Jun 2003 11:17:35 +0000 (11:17 +0000)
servers/slapd/back-bdb/cache.c

index 35101c2bb4592a2e80569872a603c46fc996cf47..f05980beb31f861a54a0a70f150ba512a579ddd1 100644 (file)
@@ -600,7 +600,9 @@ again:              ldap_pvt_thread_rdwr_rlock( &bdb->bi_cache.c_rwlock );
                                if ( rc ) {
                                        bdb_cache_entry_db_relock( bdb->bi_dbenv,
                                                locker, *eip, 1, 0, lock );
-                                       rc = bdb_fix_dn( (*eip)->bei_e, 2 );
+                                       /* check again in case other modifier did it already */
+                                       if ( bdb_fix_dn( (*eip)->bei_e, 1 ) )
+                                               rc = bdb_fix_dn( (*eip)->bei_e, 2 );
                                        bdb_cache_entry_db_relock( bdb->bi_dbenv,
                                                locker, *eip, 0, 0, lock );
                                }