]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10270 slapo-pcache: negative cache entries are not loaded when pcachePersist...
authorAndrew Elble <aweits@rit.edu>
Fri, 11 Oct 2024 12:43:47 +0000 (08:43 -0400)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 6 May 2025 15:19:48 +0000 (15:19 +0000)
servers/slapd/overlays/pcache.c

index ef32c4521dcf64a36c1ee50acec915433166483f..73fabe767b62089a18712e164ede7ee08c1f9b9c 100644 (file)
@@ -802,7 +802,11 @@ url2query(
                        goto error;
                }
 
-               cq = add_query( op, qm, &query, qt, PC_POSITIVE, 0 );
+               if (BER_BVISNULL( &uuid )) {
+                 cq = add_query( op, qm, &query, qt, PC_NEGATIVE, 0 );
+               } else {
+                 cq = add_query( op, qm, &query, qt, PC_POSITIVE, 0 );
+               }
                if ( cq != NULL ) {
                        cq->expiry_time = expiry_time;
                        cq->refresh_time = refresh_time;