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
52d289ff
Commit
52d289ff
authored
Jul 05, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a stringifier for enum req_body_state_e e
parent
51cd6729
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
12 deletions
+18
-12
cache.h
bin/varnishd/cache/cache.h
+1
-0
cache_panic.c
bin/varnishd/cache/cache_panic.c
+17
-12
No files found.
bin/varnishd/cache/cache.h
View file @
52d289ff
...
...
@@ -981,6 +981,7 @@ void MPL_Free(struct mempool *mpl, void *item);
/* cache_panic.c */
void
PAN_Init
(
void
);
const
char
*
body_status_2str
(
enum
body_status
e
);
const
char
*
reqbody_status_2str
(
enum
req_body_state_e
e
);
const
char
*
sess_close_2str
(
enum
sess_close
sc
,
int
want_desc
);
/* cache_pipe.c */
...
...
bin/varnishd/cache/cache_panic.c
View file @
52d289ff
...
...
@@ -75,6 +75,20 @@ body_status_2str(enum body_status e)
/*--------------------------------------------------------------------*/
const
char
*
reqbody_status_2str
(
enum
req_body_state_e
e
)
{
switch
(
e
)
{
#define REQ_BODY(U) case REQ_BODY_##U: return("R_BODY_" #U); break;
#include "tbl/req_body.h"
#undef REQ_BODY
default:
return
(
"?"
);
}
}
/*--------------------------------------------------------------------*/
const
char
*
sess_close_2str
(
enum
sess_close
sc
,
int
want_desc
)
{
...
...
@@ -273,7 +287,7 @@ pan_busyobj(const struct busyobj *bo)
static
void
pan_req
(
const
struct
req
*
req
)
{
const
char
*
stp
,
*
body
;
const
char
*
stp
;
VSB_printf
(
pan_vsp
,
"req = %p {
\n
"
,
req
);
...
...
@@ -290,17 +304,8 @@ pan_req(const struct req *req)
else
VSB_printf
(
pan_vsp
,
" step = 0x%x,
\n
"
,
req
->
req_step
);
switch
(
req
->
req_body_status
)
{
#define REQ_BODY(U) case REQ_BODY_##U: body = "R_BODY_" #U; break;
#include "tbl/req_body.h"
#undef REQ_BODY
default:
body
=
NULL
;
}
if
(
body
!=
NULL
)
VSB_printf
(
pan_vsp
,
" req_body = %s,
\n
"
,
body
);
else
VSB_printf
(
pan_vsp
,
" req_body = 0x%x,
\n
"
,
req
->
req_body_status
);
VSB_printf
(
pan_vsp
,
" req_body = %s,
\n
"
,
reqbody_status_2str
(
req
->
req_body_status
));
if
(
req
->
err_code
)
VSB_printf
(
pan_vsp
,
...
...
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