r2190 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Mon Oct 29 13:22:38 CET 2007
Author: phk
Date: 2007-10-29 13:22:38 +0100 (Mon, 29 Oct 2007)
New Revision: 2190
Modified:
trunk/varnish-cache/bin/varnishd/cache_center.c
Log:
Add more paranoia
Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c 2007-10-29 12:10:16 UTC (rev 2189)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c 2007-10-29 12:22:38 UTC (rev 2190)
@@ -87,6 +87,9 @@
{
int i;
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
+ AZ(sp->obj);
assert(sp->xid == 0);
i = HTC_Complete(sp->htc);
@@ -142,6 +145,10 @@
cnt_deliver(struct sess *sp)
{
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
+
sp->t_resp = TIM_real();
if (sp->obj->objhead != NULL)
EXP_Touch(sp->obj, sp->t_resp);
@@ -183,6 +190,9 @@
double dh, dp, da;
int i;
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
+
AZ(sp->obj);
AZ(sp->bereq);
sp->backend = NULL;
@@ -305,6 +315,9 @@
{
int i;
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
+
AN(sp->bereq);
CHECK_OBJ_NOTNULL(sp->backend, BACKEND_MAGIC);
i = Fetch(sp);
@@ -428,6 +441,10 @@
cnt_hit(struct sess *sp)
{
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
+
assert(!sp->obj->pass);
VCL_hit_method(sp);
@@ -492,6 +509,7 @@
uintptr_t u;
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
if (sp->obj == NULL) {
@@ -585,6 +603,10 @@
cnt_miss(struct sess *sp)
{
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
+
http_FilterHeader(sp, HTTPH_R_FETCH);
VCL_miss_method(sp);
if (sp->handling == VCL_RET_ERROR) {
@@ -644,6 +666,8 @@
cnt_pass(struct sess *sp)
{
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
AZ(sp->obj);
http_FilterHeader(sp, HTTPH_R_PASS);
@@ -690,6 +714,9 @@
cnt_pipe(struct sess *sp)
{
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
+
sp->wrk->acct.pipe++;
http_FilterHeader(sp, HTTPH_R_PIPE);
@@ -725,8 +752,9 @@
cnt_recv(struct sess *sp)
{
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
AZ(sp->obj);
- AN(sp->vcl);
VCL_recv_method(sp);
@@ -770,6 +798,7 @@
{
int done;
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
AZ(sp->restarts);
AZ(sp->obj);
AZ(sp->vcl);
More information about the varnish-commit
mailing list