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
6d1fb082
Commit
6d1fb082
authored
Apr 03, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bring ESI req cleanup more in line with the other req cleanups.
parent
1389fc96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+14
-10
No files found.
bin/varnishd/cache/cache_esi_deliver.c
View file @
6d1fb082
...
...
@@ -98,18 +98,21 @@ ved_include(struct req *preq, const char *src, const char *host,
struct
ecx
*
ecx
)
{
struct
worker
*
wrk
;
struct
sess
*
sp
;
struct
req
*
req
;
enum
req_fsm_nxt
s
;
CHECK_OBJ_NOTNULL
(
preq
,
REQ_MAGIC
);
sp
=
preq
->
sp
;
CHECK_OBJ_NOTNULL
(
sp
,
SESS_MAGIC
);
CHECK_OBJ_NOTNULL
(
ecx
,
ECX_MAGIC
);
wrk
=
preq
->
wrk
;
if
(
preq
->
esi_level
>=
cache_param
->
max_esi_depth
)
return
;
req
=
Req_New
(
wrk
,
preq
->
sp
);
SES_Ref
(
preq
->
sp
);
req
=
Req_New
(
wrk
,
sp
);
SES_Ref
(
sp
);
req
->
req_body_status
=
REQ_BODY_NONE
;
AZ
(
req
->
vsl
->
wid
);
req
->
vsl
->
wid
=
VXID_Get
(
wrk
,
VSL_CLIENTMARKER
);
...
...
@@ -158,6 +161,7 @@ ved_include(struct req *preq, const char *src, const char *host,
/* Reset request to status before we started messing with it */
HTTP_Copy
(
req
->
http
,
req
->
http0
);
AZ
(
req
->
vcl
);
req
->
vcl
=
preq
->
vcl
;
preq
->
vcl
=
NULL
;
...
...
@@ -189,27 +193,27 @@ ved_include(struct req *preq, const char *src, const char *host,
DSL
(
DBG_WAITINGLIST
,
req
->
vsl
->
wid
,
"loop waiting for ESI (%d)"
,
(
int
)
s
);
assert
(
s
==
REQ_FSM_DISEMBARK
);
Lck_Lock
(
&
req
->
sp
->
mtx
);
Lck_Lock
(
&
sp
->
mtx
);
if
(
!
ecx
->
woken
)
(
void
)
Lck_CondWait
(
&
ecx
->
preq
->
wrk
->
cond
,
&
req
->
sp
->
mtx
,
0
);
Lck_Unlock
(
&
req
->
sp
->
mtx
);
&
ecx
->
preq
->
wrk
->
cond
,
&
sp
->
mtx
,
0
);
Lck_Unlock
(
&
sp
->
mtx
);
ecx
->
woken
=
0
;
AZ
(
req
->
wrk
);
}
VRTPRIV_dynamic_kill
(
req
->
sp
->
privs
,
(
uintptr_t
)
req
);
Req_AcctLogCharge
(
wrk
->
stats
,
req
);
VSL_End
(
req
->
vsl
);
VRTPRIV_dynamic_kill
(
sp
->
privs
,
(
uintptr_t
)
req
);
AZ
(
preq
->
vcl
);
preq
->
vcl
=
req
->
vcl
;
req
->
vcl
=
NULL
;
req
->
wrk
=
NULL
;
THR_SetRequest
(
preq
);
SES_Rel
(
req
->
sp
);
Req_AcctLogCharge
(
wrk
->
stats
,
req
);
Req_Release
(
req
);
SES_Rel
(
sp
);
}
/*--------------------------------------------------------------------*/
...
...
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