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
953da353
Commit
953da353
authored
Mar 19, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also decorate listensock's with a protocol name we can use.
parent
5335c721
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
cache_acceptor.c
bin/varnishd/cache/cache_acceptor.c
+7
-1
heritage.h
bin/varnishd/common/heritage.h
+1
-0
mgt_acceptor.c
bin/varnishd/mgt/mgt_acceptor.c
+1
-0
No files found.
bin/varnishd/cache/cache_acceptor.c
View file @
953da353
...
...
@@ -296,6 +296,8 @@ vca_make_session(struct worker *wrk, void *arg)
struct
wrk_accept
*
wa
;
struct
sockaddr_storage
ss
;
struct
suckaddr
*
sa
;
enum
sess_step
first_step
;
const
char
*
proto_name
;
socklen_t
sl
;
char
laddr
[
VTCP_ADDRBUFSIZE
];
char
lport
[
VTCP_PORTBUFSIZE
];
...
...
@@ -305,6 +307,8 @@ vca_make_session(struct worker *wrk, void *arg)
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CAST_OBJ_NOTNULL
(
wa
,
arg
,
WRK_ACCEPT_MAGIC
);
pp
=
wa
->
sesspool
;
first_step
=
wa
->
acceptlsock
->
first_step
;
proto_name
=
wa
->
acceptlsock
->
proto_name
;
/* Turn accepted socket into a session */
AN
(
wrk
->
aws
->
r
);
...
...
@@ -348,7 +352,7 @@ vca_make_session(struct worker *wrk, void *arg)
VTCP_name
(
sa
,
laddr
,
sizeof
laddr
,
lport
,
sizeof
lport
);
VSL
(
SLT_Begin
,
sp
->
vxid
,
"sess 0
HTTP/1"
);
VSL
(
SLT_Begin
,
sp
->
vxid
,
"sess 0
%s"
,
proto_name
);
VSL
(
SLT_SessOpen
,
sp
->
vxid
,
"%s %s %s %s %s %.6f %d"
,
raddr
,
rport
,
wa
->
acceptlsock
->
name
,
laddr
,
lport
,
sp
->
t_open
,
sp
->
fd
);
...
...
@@ -363,6 +367,8 @@ vca_make_session(struct worker *wrk, void *arg)
need_test
=
0
;
}
vca_tcp_opt_set
(
sp
->
fd
,
0
);
assert
(
first_step
==
S_STP_H1NEWSESS
);
/* SES_sess_pool_task() must be sceduled with reserved WS */
assert
(
8
==
WS_Reserve
(
sp
->
ws
,
8
));
wrk
->
task
.
func
=
SES_sess_pool_task
;
...
...
bin/varnishd/common/heritage.h
View file @
953da353
...
...
@@ -40,6 +40,7 @@ struct listen_sock {
const
char
*
name
;
const
struct
suckaddr
*
addr
;
enum
sess_step
first_step
;
const
char
*
proto_name
;
};
VTAILQ_HEAD
(
listen_sock_head
,
listen_sock
);
...
...
bin/varnishd/mgt/mgt_acceptor.c
View file @
953da353
...
...
@@ -133,6 +133,7 @@ mac_callback(void *priv, const struct suckaddr *sa)
ls
->
sock
=
-
1
;
ls
->
addr
=
sa
;
ls
->
first_step
=
S_STP_H1NEWSESS
;
ls
->
proto_name
=
"HTTP/1"
;
fail
=
mac_opensocket
(
ls
,
NULL
);
if
(
ls
->
sock
<
0
)
{
*
(
mh
->
err
)
=
strerror
(
fail
);
...
...
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