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
d533839d
Commit
d533839d
authored
Apr 05, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collapse SES_RxReInit() into SES_RxInit().
parent
bdc63fc3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
26 deletions
+7
-26
cache.h
bin/varnishd/cache/cache.h
+0
-1
cache_acceptor.c
bin/varnishd/cache/cache_acceptor.c
+0
-1
cache_req.c
bin/varnishd/cache/cache_req.c
+2
-0
cache_session.c
bin/varnishd/cache/cache_session.c
+2
-22
cache_http1_fsm.c
bin/varnishd/http1/cache_http1_fsm.c
+2
-1
cache_proxy_proto.c
bin/varnishd/proxy/cache_proxy_proto.c
+1
-1
No files found.
bin/varnishd/cache/cache.h
View file @
d533839d
...
@@ -962,7 +962,6 @@ enum htc_status_e {
...
@@ -962,7 +962,6 @@ enum htc_status_e {
};
};
void
SES_RxInit
(
struct
http_conn
*
htc
,
struct
ws
*
ws
);
void
SES_RxInit
(
struct
http_conn
*
htc
,
struct
ws
*
ws
);
void
SES_RxReInit
(
struct
http_conn
*
htc
);
enum
htc_status_e
SES_RxStuff
(
struct
http_conn
*
,
htc_complete_f
*
,
enum
htc_status_e
SES_RxStuff
(
struct
http_conn
*
,
htc_complete_f
*
,
double
*
t1
,
double
*
t2
,
double
ti
,
double
tn
,
int
maxbytes
);
double
*
t1
,
double
*
t2
,
double
ti
,
double
tn
,
int
maxbytes
);
...
...
bin/varnishd/cache/cache_acceptor.c
View file @
d533839d
...
@@ -376,7 +376,6 @@ vca_make_session(struct worker *wrk, void *arg)
...
@@ -376,7 +376,6 @@ vca_make_session(struct worker *wrk, void *arg)
req
=
Req_New
(
wrk
,
sp
);
req
=
Req_New
(
wrk
,
sp
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
req
->
htc
->
fd
=
sp
->
fd
;
req
->
htc
->
fd
=
sp
->
fd
;
SES_RxInit
(
req
->
htc
,
req
->
ws
);
SES_SetTransport
(
wrk
,
sp
,
req
,
wa
->
acceptlsock
->
transport
);
SES_SetTransport
(
wrk
,
sp
,
req
,
wa
->
acceptlsock
->
transport
);
}
}
...
...
bin/varnishd/cache/cache_req.c
View file @
d533839d
...
@@ -66,6 +66,8 @@ Req_New(const struct worker *wrk, struct sess *sp)
...
@@ -66,6 +66,8 @@ Req_New(const struct worker *wrk, struct sess *sp)
req
->
sp
=
sp
;
req
->
sp
=
sp
;
req
->
top
=
req
;
// esi overrides
req
->
top
=
req
;
// esi overrides
INIT_OBJ
(
req
->
htc
,
HTTP_CONN_MAGIC
);
e
=
(
char
*
)
req
+
sz
;
e
=
(
char
*
)
req
+
sz
;
p
=
(
char
*
)(
req
+
1
);
p
=
(
char
*
)(
req
+
1
);
p
=
(
void
*
)
PRNDUP
(
p
);
p
=
(
void
*
)
PRNDUP
(
p
);
...
...
bin/varnishd/cache/cache_session.c
View file @
d533839d
...
@@ -185,33 +185,13 @@ SES_Get_String_Attr(const struct sess *sp, enum sess_attr a)
...
@@ -185,33 +185,13 @@ SES_Get_String_Attr(const struct sess *sp, enum sess_attr a)
void
void
SES_RxInit
(
struct
http_conn
*
htc
,
struct
ws
*
ws
)
SES_RxInit
(
struct
http_conn
*
htc
,
struct
ws
*
ws
)
{
{
ssize_t
l
;
htc
->
magic
=
HTTP_CONN_MAGIC
;
CHECK_OBJ_NOTNULL
(
htc
,
HTTP_CONN_MAGIC
)
;
htc
->
ws
=
ws
;
htc
->
ws
=
ws
;
(
void
)
WS_Reserve
(
htc
->
ws
,
0
);
(
void
)
WS_Reserve
(
htc
->
ws
,
0
);
htc
->
rxbuf_b
=
ws
->
f
;
htc
->
rxbuf_b
=
ws
->
f
;
htc
->
rxbuf_e
=
ws
->
f
;
htc
->
rxbuf_e
=
ws
->
f
;
*
htc
->
rxbuf_e
=
'\0'
;
htc
->
pipeline_b
=
NULL
;
htc
->
pipeline_e
=
NULL
;
}
/*--------------------------------------------------------------------
* Start over, and recycle any pipelined input.
* The WS_Reset is safe, even though the pipelined input is stored in
* the ws somewhere, because WS_Reset only fiddles pointers.
*/
void
SES_RxReInit
(
struct
http_conn
*
htc
)
{
ssize_t
l
;
CHECK_OBJ_NOTNULL
(
htc
,
HTTP_CONN_MAGIC
);
(
void
)
WS_Reserve
(
htc
->
ws
,
0
);
htc
->
rxbuf_b
=
htc
->
ws
->
f
;
htc
->
rxbuf_e
=
htc
->
ws
->
f
;
if
(
htc
->
pipeline_b
!=
NULL
)
{
if
(
htc
->
pipeline_b
!=
NULL
)
{
l
=
htc
->
pipeline_e
-
htc
->
pipeline_b
;
l
=
htc
->
pipeline_e
-
htc
->
pipeline_b
;
assert
(
l
>
0
);
assert
(
l
>
0
);
...
...
bin/varnishd/http1/cache_http1_fsm.c
View file @
d533839d
...
@@ -112,6 +112,7 @@ http1_new_session(struct worker *wrk, void *arg)
...
@@ -112,6 +112,7 @@ http1_new_session(struct worker *wrk, void *arg)
sp
=
req
->
sp
;
sp
=
req
->
sp
;
CHECK_OBJ_NOTNULL
(
sp
,
SESS_MAGIC
);
CHECK_OBJ_NOTNULL
(
sp
,
SESS_MAGIC
);
SES_RxInit
(
req
->
htc
,
req
->
ws
);
SES_Reserve_xport_priv
(
sp
,
&
u
);
SES_Reserve_xport_priv
(
sp
,
&
u
);
http1_setstate
(
sp
,
H1NEWREQ
);
http1_setstate
(
sp
,
H1NEWREQ
);
wrk
->
task
.
func
=
http1_req
;
wrk
->
task
.
func
=
http1_req
;
...
@@ -394,7 +395,7 @@ HTTP1_Session(struct worker *wrk, struct req *req)
...
@@ -394,7 +395,7 @@ HTTP1_Session(struct worker *wrk, struct req *req)
}
else
if
(
st
==
H1CLEANUP
)
{
}
else
if
(
st
==
H1CLEANUP
)
{
if
(
Req_Cleanup
(
sp
,
wrk
,
req
))
if
(
Req_Cleanup
(
sp
,
wrk
,
req
))
return
;
return
;
SES_Rx
ReInit
(
req
->
htc
);
SES_Rx
Init
(
req
->
htc
,
req
->
ws
);
if
(
req
->
htc
->
rxbuf_e
!=
req
->
htc
->
rxbuf_b
)
if
(
req
->
htc
->
rxbuf_e
!=
req
->
htc
->
rxbuf_b
)
wrk
->
stats
->
sess_readahead
++
;
wrk
->
stats
->
sess_readahead
++
;
http1_setstate
(
sp
,
H1NEWREQ
);
http1_setstate
(
sp
,
H1NEWREQ
);
...
...
bin/varnishd/proxy/cache_proxy_proto.c
View file @
d533839d
...
@@ -350,6 +350,7 @@ vpx_new_session(struct worker *wrk, void *arg)
...
@@ -350,6 +350,7 @@ vpx_new_session(struct worker *wrk, void *arg)
assert
(
sizeof
vpx1_sig
==
5
);
assert
(
sizeof
vpx1_sig
==
5
);
assert
(
sizeof
vpx2_sig
==
12
);
assert
(
sizeof
vpx2_sig
==
12
);
SES_RxInit
(
req
->
htc
,
req
->
ws
);
hs
=
SES_RxStuff
(
req
->
htc
,
vpx_complete
,
hs
=
SES_RxStuff
(
req
->
htc
,
vpx_complete
,
NULL
,
NULL
,
NAN
,
sp
->
t_idle
+
cache_param
->
timeout_idle
,
NULL
,
NULL
,
NAN
,
sp
->
t_idle
+
cache_param
->
timeout_idle
,
1024
);
// XXX ?
1024
);
// XXX ?
...
@@ -376,7 +377,6 @@ vpx_new_session(struct worker *wrk, void *arg)
...
@@ -376,7 +377,6 @@ vpx_new_session(struct worker *wrk, void *arg)
req
->
htc
->
pipeline_b
=
NULL
;
req
->
htc
->
pipeline_b
=
NULL
;
else
else
req
->
htc
->
pipeline_e
=
req
->
htc
->
rxbuf_e
;
req
->
htc
->
pipeline_e
=
req
->
htc
->
rxbuf_e
;
SES_RxReInit
(
req
->
htc
);
SES_SetTransport
(
wrk
,
sp
,
req
,
&
HTTP1_transport
);
SES_SetTransport
(
wrk
,
sp
,
req
,
&
HTTP1_transport
);
}
}
...
...
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