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
2c128ca1
Commit
2c128ca1
authored
Jun 17, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the panic-dump of VCL's to cache_vcl.c so cache_panic.c doesn't
need to know what's inside.
parent
2006bd9d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
19 deletions
+20
-19
cache.h
bin/varnishd/cache/cache.h
+1
-0
cache_panic.c
bin/varnishd/cache/cache_panic.c
+1
-19
cache_vcl.c
bin/varnishd/cache/cache_vcl.c
+18
-0
No files found.
bin/varnishd/cache/cache.h
View file @
2c128ca1
...
...
@@ -1066,6 +1066,7 @@ void VRY_Finish(struct req *req, enum vry_finish_flag);
/* cache_vcl.c */
void
VCL_Init
(
void
);
void
VCL_Panic
(
struct
vsb
*
,
const
struct
VCL_conf
*
);
void
VCL_Refresh
(
struct
VCL_conf
**
vcc
);
void
VCL_Ref
(
struct
VCL_conf
*
vcc
);
void
VCL_Rel
(
struct
VCL_conf
**
vcc
);
...
...
bin/varnishd/cache/cache_panic.c
View file @
2c128ca1
...
...
@@ -45,7 +45,6 @@
#include "cache_backend.h"
#include "storage/storage.h"
#include "vcl.h"
#include "vcli_priv.h"
/*
...
...
@@ -254,22 +253,6 @@ pan_objcore(const char *typ, const struct objcore *oc)
VSB_printf
(
pan_vsp
,
" }
\n
"
);
}
/*--------------------------------------------------------------------*/
static
void
pan_vcl
(
const
struct
VCL_conf
*
vcl
)
{
int
i
;
VSB_printf
(
pan_vsp
,
" vcl = {
\n
"
);
VSB_printf
(
pan_vsp
,
" srcname = {
\n
"
);
for
(
i
=
0
;
i
<
vcl
->
nsrc
;
++
i
)
VSB_printf
(
pan_vsp
,
"
\"
%s
\"
,
\n
"
,
vcl
->
srcname
[
i
]);
VSB_printf
(
pan_vsp
,
" },
\n
"
);
VSB_printf
(
pan_vsp
,
" },
\n
"
);
}
/*--------------------------------------------------------------------*/
static
void
...
...
@@ -406,8 +389,7 @@ pan_req(const struct req *req)
if
(
req
->
resp
->
ws
!=
NULL
)
pan_http
(
"resp"
,
req
->
resp
,
2
);
if
(
VALID_OBJ
(
req
->
vcl
,
VCL_CONF_MAGIC
))
pan_vcl
(
req
->
vcl
);
VCL_Panic
(
pan_vsp
,
req
->
vcl
);
if
(
req
->
objcore
!=
NULL
)
{
pan_objcore
(
"REQ"
,
req
->
objcore
);
...
...
bin/varnishd/cache/cache_vcl.c
View file @
2c128ca1
...
...
@@ -66,6 +66,24 @@ static struct vcl *vcl_active; /* protected by vcl_mtx */
/*--------------------------------------------------------------------*/
void
VCL_Panic
(
struct
vsb
*
vsb
,
const
struct
VCL_conf
*
vcl
)
{
int
i
;
AN
(
vsb
);
if
(
vcl
==
NULL
)
return
;
VSB_printf
(
vsb
,
" vcl = {
\n
"
);
VSB_printf
(
vsb
,
" srcname = {
\n
"
);
for
(
i
=
0
;
i
<
vcl
->
nsrc
;
++
i
)
VSB_printf
(
vsb
,
"
\"
%s
\"
,
\n
"
,
vcl
->
srcname
[
i
]);
VSB_printf
(
vsb
,
" },
\n
"
);
VSB_printf
(
vsb
,
" },
\n
"
);
}
/*--------------------------------------------------------------------*/
const
char
*
VCL_Return_Name
(
unsigned
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