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
0664f1da
Commit
0664f1da
authored
Jan 05, 2021
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give TCP Pools a panic function.
parent
629c3f17
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
5 deletions
+30
-5
cache_backend.c
bin/varnishd/cache/cache_backend.c
+1
-5
cache_tcp_pool.c
bin/varnishd/cache/cache_tcp_pool.c
+27
-0
cache_tcp_pool.h
bin/varnishd/cache/cache_tcp_pool.h
+2
-0
No files found.
bin/varnishd/cache/cache_backend.c
View file @
0664f1da
...
...
@@ -464,11 +464,7 @@ vbe_panic(const struct director *d, struct vsb *vsb)
CHECK_OBJ_NOTNULL
(
d
,
DIRECTOR_MAGIC
);
CAST_OBJ_NOTNULL
(
bp
,
d
->
priv
,
BACKEND_MAGIC
);
if
(
bp
->
ipv4_addr
!=
NULL
)
VSB_printf
(
vsb
,
"ipv4 = %s,
\n
"
,
bp
->
ipv4_addr
);
if
(
bp
->
ipv6_addr
!=
NULL
)
VSB_printf
(
vsb
,
"ipv6 = %s,
\n
"
,
bp
->
ipv6_addr
);
VSB_printf
(
vsb
,
"port = %s,
\n
"
,
bp
->
port
);
VTP_panic
(
vsb
,
bp
->
tcp_pool
);
VSB_printf
(
vsb
,
"hosthdr = %s,
\n
"
,
bp
->
hosthdr
);
VSB_printf
(
vsb
,
"n_conn = %u,
\n
"
,
bp
->
n_conn
);
}
...
...
bin/varnishd/cache/cache_tcp_pool.c
View file @
0664f1da
...
...
@@ -816,6 +816,33 @@ VTP_getip(struct pfd *pfd)
/*--------------------------------------------------------------------*/
void
VTP_panic
(
struct
vsb
*
vsb
,
struct
tcp_pool
*
tp
)
{
char
h
[
VTCP_ADDRBUFSIZE
];
char
p
[
VTCP_PORTBUFSIZE
];
if
(
PAN_dump_struct
(
vsb
,
tp
,
TCP_POOL_MAGIC
,
"tcp_pool"
))
return
;
VSB_printf
(
vsb
,
"id = 0x%jx,
\n
"
,
tp
->
cp
->
id
);
if
(
tp
->
uds
)
VSB_printf
(
vsb
,
"uds = %s,
\n
"
,
tp
->
uds
);
if
(
tp
->
ip4
&&
VSA_Sane
(
tp
->
ip4
))
{
VTCP_name
(
tp
->
ip4
,
h
,
sizeof
h
,
p
,
sizeof
p
);
VSB_printf
(
vsb
,
"ipv4 = %s, "
,
h
);
VSB_printf
(
vsb
,
"port = %s,
\n
"
,
p
);
}
if
(
tp
->
ip6
&&
VSA_Sane
(
tp
->
ip6
))
{
VTCP_name
(
tp
->
ip4
,
h
,
sizeof
h
,
p
,
sizeof
p
);
VSB_printf
(
vsb
,
"ipv6 = %s, "
,
h
);
VSB_printf
(
vsb
,
"port = %s,
\n
"
,
p
);
}
VSB_indent
(
vsb
,
-
2
);
VSB_cat
(
vsb
,
"},
\n
"
);
}
/*--------------------------------------------------------------------*/
void
VTP_Init
(
void
)
{
...
...
bin/varnishd/cache/cache_tcp_pool.h
View file @
0664f1da
...
...
@@ -103,5 +103,7 @@ int VTP_Wait(struct worker *, struct pfd *, vtim_real tmo);
* function before attempting to receive on the connection.
*/
void
VTP_panic
(
struct
vsb
*
,
struct
tcp_pool
*
);
const
struct
suckaddr
*
VTP_getip
(
struct
pfd
*
);
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