]> git.sur5r.net Git - openldap/commitdiff
ITS#8291 Reopen cursor after delete
authorOndřej Kuzník <ondra@mistotebe.net>
Wed, 16 Dec 2015 12:47:17 +0000 (13:47 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 11 Oct 2017 21:32:08 +0000 (14:32 -0700)
servers/slapd/back-bdb/tools.c

index bac93bf91b9e843497bee4a3d4527fe0d9957cf2..004583d198ae0d04869e698635470ce7c890b147 100644 (file)
@@ -1158,9 +1158,12 @@ done:
                }
        }
 
-       rc = bdb->bi_id2entry->bdi_db->cursor(
-               bdb->bi_id2entry->bdi_db, bdb->bi_cache.c_txn, &cursor,
-               bdb->bi_db_opflags );
+       if ( cursor == NULL )
+       {
+               rc = bdb->bi_id2entry->bdi_db->cursor(
+                       bdb->bi_id2entry->bdi_db, bdb->bi_cache.c_txn, &cursor,
+                       bdb->bi_db_opflags );
+       }
 
        return rc;
 }