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
3d5911a0
Commit
3d5911a0
authored
Feb 12, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give panic access to the sessions transport protocol via the
session number.
parent
604d0fba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
cache_acceptor.c
bin/varnishd/cache/cache_acceptor.c
+12
-1
cache_panic.c
bin/varnishd/cache/cache_panic.c
+5
-2
cache_transport.h
bin/varnishd/cache/cache_transport.h
+2
-0
No files found.
bin/varnishd/cache/cache_acceptor.c
View file @
3d5911a0
...
...
@@ -638,7 +638,7 @@ XPORT_Init(void)
const
struct
transport
*
XPORT_Find
(
const
char
*
name
)
{
struct
transport
*
xp
;
const
struct
transport
*
xp
;
ASSERT_MGT
();
...
...
@@ -647,3 +647,14 @@ XPORT_Find(const char *name)
return
(
xp
);
return
(
NULL
);
}
const
struct
transport
*
XPORT_ByNumber
(
uint16_t
no
)
{
const
struct
transport
*
xp
;
VTAILQ_FOREACH
(
xp
,
&
transports
,
list
)
if
(
xp
->
number
==
no
)
return
(
xp
);
return
(
NULL
);
}
bin/varnishd/cache/cache_panic.c
View file @
3d5911a0
...
...
@@ -445,13 +445,16 @@ pan_sess(struct vsb *vsb, const struct sess *sp)
const
char
*
stp
;
const
char
*
ci
;
const
char
*
cp
;
const
struct
transport
*
xp
;
VSB_printf
(
vsb
,
"sp = %p {
\n
"
,
sp
);
if
(
pan_already
(
vsb
,
sp
))
return
;
VSB_indent
(
vsb
,
2
);
VSB_printf
(
vsb
,
"fd = %d, vxid = %u
\n
"
,
sp
->
fd
,
VXID
(
sp
->
vxid
));
xp
=
XPORT_ByNumber
(
sp
->
sattr
[
SA_TRANSPORT
]);
VSB_printf
(
vsb
,
"fd = %d, vxid = %u, transport = %s
\n
"
,
sp
->
fd
,
VXID
(
sp
->
vxid
),
xp
==
NULL
?
"<none>"
:
xp
->
name
);
ci
=
SES_Get_String_Attr
(
sp
,
SA_CLIENT_IP
);
cp
=
SES_Get_String_Attr
(
sp
,
SA_CLIENT_PORT
);
VSB_printf
(
vsb
,
"client = %s %s,
\n
"
,
ci
,
cp
);
...
...
bin/varnishd/cache/cache_transport.h
View file @
3d5911a0
...
...
@@ -59,3 +59,5 @@ struct transport {
extern
struct
transport
PROXY_transport
;
extern
struct
transport
HTTP1_transport
;
const
struct
transport
*
XPORT_ByNumber
(
uint16_t
no
);
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