Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
60945816
Commit
60945816
authored
Jun 12, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more asserts to nail #1147
parent
e75cd2e6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
cache_center.c
bin/varnishd/cache/cache_center.c
+24
-0
cache_session.c
bin/varnishd/cache/cache_session.c
+2
-0
cache_vcl.c
bin/varnishd/cache/cache_vcl.c
+1
-0
No files found.
bin/varnishd/cache/cache_center.c
View file @
60945816
...
...
@@ -268,7 +268,9 @@ cnt_prepresp(struct sess *sp, struct worker *wrk, struct req *req)
HTTP_Setup
(
req
->
resp
,
req
->
ws
,
req
->
vsl
,
HTTP_Resp
);
RES_BuildHttp
(
sp
);
assert
(
req
->
sp
==
sp
);
VCL_deliver_method
(
req
);
assert
(
req
->
sp
==
sp
);
switch
(
req
->
handling
)
{
case
VCL_RET_DELIVER
:
break
;
...
...
@@ -523,7 +525,9 @@ cnt_error(struct sess *sp, struct worker *wrk, struct req *req)
http_PutResponse
(
h
,
req
->
err_reason
);
else
http_PutResponse
(
h
,
http_StatusMessage
(
req
->
err_code
));
assert
(
req
->
sp
==
sp
);
VCL_error_method
(
req
);
assert
(
req
->
sp
==
sp
);
if
(
req
->
handling
==
VCL_RET_RESTART
&&
req
->
restarts
<
cache_param
->
max_restarts
)
{
...
...
@@ -632,7 +636,9 @@ cnt_fetch(struct sess *sp, struct worker *wrk, struct req *req)
AZ
(
bo
->
do_esi
);
AZ
(
bo
->
do_pass
);
assert
(
req
->
sp
==
sp
);
VCL_fetch_method
(
req
);
assert
(
req
->
sp
==
sp
);
if
(
bo
->
do_pass
)
req
->
objcore
->
flags
|=
OC_F_PASS
;
...
...
@@ -1001,7 +1007,9 @@ cnt_hit(struct sess *sp, struct worker *wrk, struct req *req)
assert
(
!
(
req
->
obj
->
objcore
->
flags
&
OC_F_PASS
));
assert
(
req
->
sp
==
sp
);
VCL_hit_method
(
req
);
assert
(
req
->
sp
==
sp
);
if
(
req
->
handling
==
VCL_RET_DELIVER
)
{
//AZ(req->busyobj->bereq->ws);
...
...
@@ -1175,7 +1183,9 @@ cnt_miss(struct sess *sp, struct worker *wrk, struct req *req)
http_SetHeader
(
bo
->
bereq
,
"Accept-Encoding: gzip"
);
}
assert
(
req
->
sp
==
sp
);
VCL_miss_method
(
req
);
assert
(
req
->
sp
==
sp
);
if
(
req
->
handling
==
VCL_RET_FETCH
)
{
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
...
...
@@ -1241,7 +1251,9 @@ cnt_pass(struct sess *sp, struct worker *wrk, struct req *req)
HTTP_Setup
(
bo
->
bereq
,
bo
->
ws
,
bo
->
vsl
,
HTTP_Bereq
);
http_FilterReq
(
sp
,
HTTPH_R_PASS
);
assert
(
req
->
sp
==
sp
);
VCL_pass_method
(
req
);
assert
(
req
->
sp
==
sp
);
if
(
req
->
handling
==
VCL_RET_ERROR
)
{
http_Teardown
(
bo
->
bereq
);
...
...
@@ -1301,7 +1313,9 @@ cnt_pipe(struct sess *sp, struct worker *wrk, struct req *req)
HTTP_Setup
(
bo
->
bereq
,
bo
->
ws
,
bo
->
vsl
,
HTTP_Bereq
);
http_FilterReq
(
sp
,
0
);
assert
(
req
->
sp
==
sp
);
VCL_pipe_method
(
req
);
assert
(
req
->
sp
==
sp
);
if
(
req
->
handling
==
VCL_RET_ERROR
)
INCOMPL
();
...
...
@@ -1399,7 +1413,9 @@ cnt_recv(struct sess *sp, const struct worker *wrk, struct req *req)
http_CollectHdr
(
req
->
http
,
H_Cache_Control
);
assert
(
req
->
sp
==
sp
);
VCL_recv_method
(
req
);
assert
(
req
->
sp
==
sp
);
recv_handling
=
req
->
handling
;
if
(
cache_param
->
http_gzip_support
&&
...
...
@@ -1415,7 +1431,9 @@ cnt_recv(struct sess *sp, const struct worker *wrk, struct req *req)
req
->
sha256ctx
=
&
sha256ctx
;
/* so HSH_AddString() can find it */
SHA256_Init
(
req
->
sha256ctx
);
assert
(
req
->
sp
==
sp
);
VCL_hash_method
(
req
);
assert
(
req
->
sp
==
sp
);
assert
(
req
->
handling
==
VCL_RET_HASH
);
SHA256_Final
(
req
->
digest
,
req
->
sha256ctx
);
req
->
sha256ctx
=
NULL
;
...
...
@@ -1616,6 +1634,12 @@ CNT_Session(struct sess *sp)
CHECK_OBJ_ORNULL
(
wrk
->
nobjhead
,
OBJHEAD_MAGIC
);
WS_Assert
(
wrk
->
aws
);
if
(
sp
->
req
!=
NULL
)
{
CHECK_OBJ_NOTNULL
(
sp
->
req
,
REQ_MAGIC
);
AN
(
sp
->
req
->
sp
);
assert
(
sp
->
req
->
sp
==
sp
);
}
switch
(
sp
->
step
)
{
#define STEP(l,u,arg) \
case STP_##u: \
...
...
bin/varnishd/cache/cache_session.c
View file @
60945816
...
...
@@ -352,6 +352,8 @@ SES_ReleaseReq(struct sess *sp)
CHECK_OBJ_NOTNULL
(
pp
,
SESSPOOL_MAGIC
);
AN
(
pp
->
pool
);
CHECK_OBJ_NOTNULL
(
sp
->
req
,
REQ_MAGIC
);
AN
(
sp
->
req
->
sp
);
assert
(
sp
->
req
->
sp
==
sp
);
MPL_AssertSane
(
sp
->
req
);
VSL_Flush
(
sp
->
req
->
vsl
,
0
);
MPL_Free
(
pp
->
mpl_req
,
sp
->
req
);
...
...
bin/varnishd/cache/cache_vcl.c
View file @
60945816
...
...
@@ -340,6 +340,7 @@ VCL_##func##_method(struct req *req) \
\
CHECK_OBJ_NOTNULL(req, REQ_MAGIC); \
CHECK_OBJ_NOTNULL(req->sp, SESS_MAGIC); \
AN(req->sp); \
req->handling = 0; \
req->cur_method = VCL_MET_ ## upper; \
VSLb(req->vsl, SLT_VCL_call, "%s", #func); \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment