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
e76461b7
Commit
e76461b7
authored
Nov 24, 2015
by
Poul-Henning Kamp
Committed by
Lasse Karstensen
Jan 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't quote NL in panic messages
parent
b55bff1c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
mgt_child.c
bin/varnishd/mgt/mgt_child.c
+2
-1
vsb.h
include/vsb.h
+1
-0
vsb.c
lib/libvarnish/vsb.c
+4
-1
No files found.
bin/varnishd/mgt/mgt_child.c
View file @
e76461b7
...
@@ -117,7 +117,8 @@ mgt_panic_record(pid_t r)
...
@@ -117,7 +117,8 @@ mgt_panic_record(pid_t r)
VTIM_format
(
VTIM_real
(),
time_str
);
VTIM_format
(
VTIM_real
(),
time_str
);
VSB_printf
(
child_panic
,
"Last panic at: %s
\n
"
,
time_str
);
VSB_printf
(
child_panic
,
"Last panic at: %s
\n
"
,
time_str
);
VSB_quote
(
child_panic
,
heritage
.
panic_str
,
VSB_quote
(
child_panic
,
heritage
.
panic_str
,
strnlen
(
heritage
.
panic_str
,
heritage
.
panic_str_len
),
0
);
strnlen
(
heritage
.
panic_str
,
heritage
.
panic_str_len
),
VSB_QUOTE_NONL
);
AZ
(
VSB_finish
(
child_panic
));
AZ
(
VSB_finish
(
child_panic
));
MGT_complain
(
C_ERR
,
"Child (%jd) %s"
,
MGT_complain
(
C_ERR
,
"Child (%jd) %s"
,
(
intmax_t
)
r
,
VSB_data
(
child_panic
));
(
intmax_t
)
r
,
VSB_data
(
child_panic
));
...
...
include/vsb.h
View file @
e76461b7
...
@@ -75,6 +75,7 @@ int VSB_finish(struct vsb *);
...
@@ -75,6 +75,7 @@ int VSB_finish(struct vsb *);
char
*
VSB_data
(
const
struct
vsb
*
);
char
*
VSB_data
(
const
struct
vsb
*
);
ssize_t
VSB_len
(
const
struct
vsb
*
);
ssize_t
VSB_len
(
const
struct
vsb
*
);
void
VSB_delete
(
struct
vsb
*
);
void
VSB_delete
(
struct
vsb
*
);
#define VSB_QUOTE_NONL 1
void
VSB_quote
(
struct
vsb
*
s
,
const
char
*
p
,
int
len
,
int
how
);
void
VSB_quote
(
struct
vsb
*
s
,
const
char
*
p
,
int
len
,
int
how
);
void
VSB_indent
(
struct
vsb
*
,
int
);
void
VSB_indent
(
struct
vsb
*
,
int
);
#ifdef __cplusplus
#ifdef __cplusplus
...
...
lib/libvarnish/vsb.c
View file @
e76461b7
...
@@ -519,7 +519,10 @@ VSB_quote(struct vsb *s, const char *p, int len, int how)
...
@@ -519,7 +519,10 @@ VSB_quote(struct vsb *s, const char *p, int len, int how)
(
void
)
VSB_putc
(
s
,
*
q
);
(
void
)
VSB_putc
(
s
,
*
q
);
break
;
break
;
case
'\n'
:
case
'\n'
:
(
void
)
VSB_cat
(
s
,
"
\\
n"
);
if
(
how
&
VSB_QUOTE_NONL
)
(
void
)
VSB_cat
(
s
,
"
\n
"
);
else
(
void
)
VSB_cat
(
s
,
"
\\
n"
);
break
;
break
;
case
'\r'
:
case
'\r'
:
(
void
)
VSB_cat
(
s
,
"
\\
r"
);
(
void
)
VSB_cat
(
s
,
"
\\
r"
);
...
...
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