From 2b200b84f9a6c29b97bb41465b1a8e9566e38b87 Mon Sep 17 00:00:00 2001 From: Cliff Woolley Date: Wed, 14 Aug 2002 01:24:16 +0000 Subject: [PATCH] on second thought, it actually *is* possible for this to bubble up rather than down, strange as that may seem. this function still needs further testing, but this is better than what was there a minute ago. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96372 13f79535-47bb-0310-9956-ffa450edef68 --- modules/experimental/cache_pqueue.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/experimental/cache_pqueue.c b/modules/experimental/cache_pqueue.c index 144e7c65c5..5ded190797 100644 --- a/modules/experimental/cache_pqueue.c +++ b/modules/experimental/cache_pqueue.c @@ -223,7 +223,10 @@ apr_status_t cache_pq_remove(cache_pqueue_t *q, void *d) { apr_ssize_t posn = q->get(d); q->d[posn] = q->d[--q->size]; - cache_pq_percolate_down(q, posn); + if (q->pri(q->d[posn]) > q->pri(d)) + cache_pq_bubble_up(q, posn); + else + cache_pq_percolate_down(q, posn); return APR_SUCCESS; } -- 2.50.1