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
99d67512
Commit
99d67512
authored
Jun 19, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make HTC_Init() part of getting a request
parent
47c7bc11
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
15 deletions
+11
-15
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_center.c
bin/varnishd/cache/cache_center.c
+3
-13
cache_session.c
bin/varnishd/cache/cache_session.c
+7
-1
No files found.
bin/varnishd/cache/cache.h
View file @
99d67512
...
...
@@ -921,7 +921,7 @@ struct sesspool *SES_NewPool(struct pool *pp, unsigned pool_no);
void
SES_DeletePool
(
struct
sesspool
*
sp
);
int
SES_Schedule
(
struct
sess
*
sp
);
void
SES_Handle
(
struct
sess
*
sp
,
double
now
);
void
SES_GetReq
(
struct
sess
*
sp
);
struct
req
*
SES_GetReq
(
struct
sess
*
sp
);
void
SES_ReleaseReq
(
struct
sess
*
sp
);
pool_func_t
SES_pool_accept_task
;
...
...
bin/varnishd/cache/cache_center.c
View file @
99d67512
...
...
@@ -110,16 +110,10 @@ cnt_wait(struct sess *sp, struct worker *wrk, struct req *req)
assert
(
!
isnan
(
sp
->
t_rx
));
if
(
req
==
NULL
)
{
SES_GetReq
(
sp
);
req
=
sp
->
req
;
req
=
SES_GetReq
(
sp
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
assert
(
req
->
sp
==
sp
);
HTC_Init
(
req
->
htc
,
req
->
ws
,
sp
->
fd
,
sp
->
req
->
vsl
,
cache_param
->
http_req_size
,
cache_param
->
http_req_hdr_len
);
}
else
{
assert
(
req
->
sp
==
sp
);
}
assert
(
req
->
sp
==
sp
);
AZ
(
req
->
vcl
);
AZ
(
req
->
obj
);
...
...
@@ -945,13 +939,9 @@ cnt_first(struct sess *sp, struct worker *wrk)
/* Allocate a request already now, so we can VSL to it */
AZ
(
sp
->
req
);
SES_GetReq
(
sp
);
req
=
sp
->
req
;
req
=
SES_GetReq
(
sp
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
assert
(
req
->
sp
==
sp
);
HTC_Init
(
req
->
htc
,
req
->
ws
,
sp
->
fd
,
req
->
vsl
,
cache_param
->
http_req_size
,
cache_param
->
http_req_hdr_len
);
VTCP_name
(
&
sp
->
sockaddr
,
sp
->
sockaddrlen
,
sp
->
addr
,
sizeof
sp
->
addr
,
sp
->
port
,
sizeof
sp
->
port
);
...
...
bin/varnishd/cache/cache_session.c
View file @
99d67512
...
...
@@ -287,7 +287,7 @@ SES_Delete(struct sess *sp, const char *reason, double now)
* Alloc/Free sp->req
*/
void
struct
req
*
SES_GetReq
(
struct
sess
*
sp
)
{
struct
sesspool
*
pp
;
...
...
@@ -341,6 +341,12 @@ SES_GetReq(struct sess *sp)
assert
(
p
<
e
);
WS_Init
(
req
->
ws
,
"req"
,
p
,
e
-
p
);
HTC_Init
(
req
->
htc
,
req
->
ws
,
sp
->
fd
,
req
->
vsl
,
cache_param
->
http_req_size
,
cache_param
->
http_req_hdr_len
);
return
(
req
);
}
void
...
...
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