[master] 5052cf6 Fix asserts

Poul-Henning Kamp phk at FreeBSD.org
Wed Feb 24 20:04:04 CET 2016


commit 5052cf6f2e7df462478663960f5a95e7328891d2
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Feb 24 19:03:50 2016 +0000

    Fix asserts

diff --git a/bin/varnishd/cache/cache_obj.c b/bin/varnishd/cache/cache_obj.c
index 1bae372..09ddeed 100644
--- a/bin/varnishd/cache/cache_obj.c
+++ b/bin/varnishd/cache/cache_obj.c
@@ -226,7 +226,8 @@ ObjSetState(struct worker *wrk, const struct objcore *oc,
 	assert(next > oc->boc->state);
 
 	CHECK_OBJ_ORNULL(oc->stobj->stevedore, STEVEDORE_MAGIC);
-	AN(next != BOS_FINISHED || (oc->oa_present & (1 << OA_LEN)));
+	assert(next != BOS_STREAM || oc->boc->state == BOS_PREP_STREAM);
+	assert(next != BOS_FINISHED || (oc->oa_present & (1 << OA_LEN)));
 
 	if (oc->stobj->stevedore != NULL) {
 		om = oc->stobj->stevedore->methods;



More information about the varnish-commit mailing list