[master] 4c47a36 Fix a bug discovered by inspection:
Poul-Henning Kamp
phk at varnish-cache.org
Mon Jan 21 21:50:18 CET 2013
commit 4c47a36e9f8b7b2dfe7eff60c3fda418dc6effca
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Jan 21 20:49:46 2013 +0000
Fix a bug discovered by inspection:
If we fail to allocate storage, try a smaller chunk, not a larger one.
diff --git a/bin/varnishd/storage/stevedore.c b/bin/varnishd/storage/stevedore.c
index 0416077..b9408cf 100644
--- a/bin/varnishd/storage/stevedore.c
+++ b/bin/varnishd/storage/stevedore.c
@@ -180,7 +180,7 @@ stv_alloc(struct stevedore *stv, size_t size)
if (size <= cache_param->fetch_chunksize)
break;
- size >>= 1;
+ size <<= 1;
}
if (st != NULL)
CHECK_OBJ_NOTNULL(st, STORAGE_MAGIC);
diff --git a/bin/varnishtest/tests/r01175.vtc b/bin/varnishtest/tests/r01175.vtc
index 739c56a..5cac147 100644
--- a/bin/varnishtest/tests/r01175.vtc
+++ b/bin/varnishtest/tests/r01175.vtc
@@ -17,4 +17,4 @@ client c1 {
expect resp.status == 503
} -run
-varnish v1 -expect SMA.test.c_fail < 5
+varnish v1 -expect SMA.test.c_fail < 50
More information about the varnish-commit
mailing list