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
233b1328
Commit
233b1328
authored
Oct 21, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish the heritage structure a little bit, and don't pass the
panic_string to syslog until we have washed it.
parent
ed6dca6b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
12 deletions
+11
-12
cache_vrt_var.c
bin/varnishd/cache/cache_vrt_var.c
+1
-1
heritage.h
bin/varnishd/common/heritage.h
+1
-2
mgt_child.c
bin/varnishd/mgt/mgt_child.c
+5
-6
mgt_main.c
bin/varnishd/mgt/mgt_main.c
+4
-3
No files found.
bin/varnishd/cache/cache_vrt_var.c
View file @
233b1328
...
...
@@ -623,7 +623,7 @@ VRT_r_server_identity(VRT_CTX)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
if
(
heritage
.
identity
[
0
]
!=
'\0'
)
if
(
heritage
.
identity
!=
NULL
)
return
(
heritage
.
identity
);
else
return
(
heritage
.
name
);
...
...
bin/varnishd/common/heritage.h
View file @
233b1328
...
...
@@ -56,7 +56,6 @@ struct heritage {
/* Sockets from which to accept connections */
struct
listen_sock_head
socks
;
unsigned
nsocks
;
/* Hash method */
const
struct
hash_slinger
*
hash
;
...
...
@@ -66,7 +65,7 @@ struct heritage {
struct
params
*
param
;
char
*
name
;
c
har
identity
[
1024
]
;
c
onst
char
*
identity
;
char
*
panic_str
;
ssize_t
panic_str_len
;
...
...
bin/varnishd/mgt/mgt_child.c
View file @
233b1328
...
...
@@ -125,18 +125,17 @@ mgt_panic_record(pid_t r)
{
char
time_str
[
30
];
AN
(
heritage
.
panic_str
[
0
]);
REPORT
(
LOG_ERR
,
"Child (%jd) Panic message:
\n
%s"
,
(
intmax_t
)
r
,
heritage
.
panic_str
);
if
(
child_panic
!=
NULL
)
VSB_delete
(
child_panic
);
child_panic
=
VSB_new_auto
();
AN
(
child_panic
);
VTIM_format
(
VTIM_real
(),
time_str
);
VSB_printf
(
child_panic
,
"Last panic at: %s
\n
"
,
time_str
);
VSB_cat
(
child_panic
,
heritage
.
panic_str
);
VSB_printf
(
child_panic
,
"Panic at: %s
\n
"
,
time_str
);
VSB_quote
(
child_panic
,
heritage
.
panic_str
,
strnlen
(
heritage
.
panic_str
,
heritage
.
panic_str_len
),
0
);
AZ
(
VSB_finish
(
child_panic
));
REPORT
(
LOG_ERR
,
"Child (%jd) %s"
,
(
intmax_t
)
r
,
VSB_data
(
child_panic
));
}
static
void
...
...
bin/varnishd/mgt/mgt_main.c
View file @
233b1328
...
...
@@ -424,9 +424,10 @@ identify(const char *i_arg)
strcpy
(
id
,
"varnishd"
);
if
(
i_arg
!=
NULL
)
{
if
(
strlen
(
i_arg
)
+
1
>
sizeof
heritage
.
identity
)
ARGV_ERR
(
"Identity (-i) name too long.
\n
"
);
strcpy
(
heritage
.
identity
,
i_arg
);
if
(
strlen
(
i_arg
)
+
1
>
1024
)
ARGV_ERR
(
"Identity (-i) name too long (max 1023).
\n
"
);
heritage
.
identity
=
strdup
(
i_arg
);
AN
(
heritage
.
identity
);
i
=
strlen
(
id
);
id
[
i
++
]
=
'/'
;
for
(;
i
<
(
sizeof
(
id
)
-
1L
);
i
++
)
{
...
...
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