From: Ralf Haferkamp Date: Thu, 26 May 2011 07:05:01 +0000 (+0200) Subject: ITS#6953 do not use the cache db when refreshing X-Git-Tag: OPENLDAP_REL_ENG_2_5_0ALPHA~1375 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=200af921f4f1de43d89ba587d711ee9fc739e1bb;p=thirdparty%2Fopenldap.git ITS#6953 do not use the cache db when refreshing --- diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index 62477513bd..75ab887bdf 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -2891,6 +2891,8 @@ pcache_op_bind( return SLAP_CB_CONTINUE; } +static slap_response refresh_merge; + static int pcache_op_search( Operation *op, @@ -2929,7 +2931,8 @@ pcache_op_search( cm->db.be_acl = op->o_bd->be_acl; { - /* See if we're processing a Bind request */ + /* See if we're processing a Bind request + * or a cache refresh */ slap_callback *cb = op->o_callback; for ( ; cb; cb=cb->sc_next ) { @@ -2937,6 +2940,10 @@ pcache_op_search( pbi = cb->sc_private; break; } + if ( cb->sc_response == refresh_merge ) { + /* This is a refresh, do not search the cache */ + return SLAP_CB_CONTINUE; + } } }