]> git.sur5r.net Git - openldap/commitdiff
ITS#6484 - cache DB needs to release its own entries
authorHoward Chu <hyc@openldap.org>
Tue, 2 Mar 2010 21:29:32 +0000 (21:29 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 2 Mar 2010 21:29:32 +0000 (21:29 +0000)
servers/slapd/overlays/pcache.c

index 351d68a84afe6eb5a80843f1a475e4e9d6459699..3623f37245ee3c9f0b52399fd103c801ff147b80 100644 (file)
@@ -5219,6 +5219,20 @@ pcache_op_extended( Operation *op, SlapReply *rs )
        return SLAP_CB_CONTINUE;
 }
 
+static int
+pcache_entry_release( Operation  *op, Entry *e, int rw )
+{
+       slap_overinst   *on = (slap_overinst *)op->o_bd->bd_info;
+       cache_manager   *cm = on->on_bi.bi_private;
+       BackendDB *db = op->o_bd;
+       int rc;
+
+       op->o_bd = &cm->db;
+       rc = be_entry_release_rw( op, e, rw );
+       op->o_bd = db;
+       return rc;
+}
+
 #ifdef PCACHE_MONITOR
 
 static int
@@ -5605,6 +5619,7 @@ pcache_initialize()
 #endif /* PCACHE_CONTROL_PRIVDB */
        pcache.on_bi.bi_extended = pcache_op_extended;
 
+       pcache.on_bi.bi_entry_release_rw = pcache_entry_release;
        pcache.on_bi.bi_chk_controls = pcache_chk_controls;
 
        pcache.on_bi.bi_cf_ocs = pcocs;