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
fa6d6490
Commit
fa6d6490
authored
Jun 17, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Isolate VCL-internals more in cache_vcl.c
parent
93112f34
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
8 deletions
+15
-8
cache.h
bin/varnishd/cache/cache.h
+6
-5
cache_backend_cfg.c
bin/varnishd/cache/cache_backend_cfg.c
+2
-3
cache_vcl.c
bin/varnishd/cache/cache_vcl.c
+7
-0
No files found.
bin/varnishd/cache/cache.h
View file @
fa6d6490
...
...
@@ -1065,15 +1065,16 @@ enum vry_finish_flag { KEEP, DISCARD };
void
VRY_Finish
(
struct
req
*
req
,
enum
vry_finish_flag
);
/* cache_vcl.c */
struct
director
*
VCL_DefaultDirector
(
const
struct
VCL_conf
*
);
void
VCL_Init
(
void
);
const
char
*
VCL_Method_Name
(
unsigned
);
const
char
*
VCL_Name
(
const
struct
VCL_conf
*
);
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
);
void
VCL_Poll
(
void
);
struct
director
*
VCL_DefaultDirector
(
const
struct
VCL_conf
*
);
void
VCL_Ref
(
struct
VCL_conf
*
);
void
VCL_Refresh
(
struct
VCL_conf
**
);
void
VCL_Rel
(
struct
VCL_conf
**
);
const
char
*
VCL_Return_Name
(
unsigned
);
const
char
*
VCL_Method_Name
(
unsigned
);
#define VCL_MET_MAC(l,u,b) \
void VCL_##l##_method(struct VCL_conf *, struct worker *, struct req *, \
...
...
bin/varnishd/cache/cache_backend_cfg.c
View file @
fa6d6490
...
...
@@ -41,7 +41,6 @@
#include "cache_backend.h"
#include "vcli.h"
#include "vcli_priv.h"
#include "vcl.h"
#include "vsa.h"
#include "vrt.h"
#include "vtim.h"
...
...
@@ -162,13 +161,13 @@ backend_find(struct cli *cli, const char *matcher, bf_func *func, void *priv)
AN
(
vsb
);
if
(
matcher
==
NULL
||
*
matcher
==
'\0'
||
!
strcmp
(
matcher
,
"*"
))
{
// all backends in active VCL
VSB_printf
(
vsb
,
"%s.*"
,
vcc
->
loaded_name
);
VSB_printf
(
vsb
,
"%s.*"
,
VCL_Name
(
vcc
)
);
}
else
if
(
strchr
(
matcher
,
'.'
)
!=
NULL
)
{
// use pattern as is
VSB_cat
(
vsb
,
matcher
);
}
else
{
// pattern applies to active vcl
VSB_printf
(
vsb
,
"%s.%s"
,
vcc
->
loaded_name
,
matcher
);
VSB_printf
(
vsb
,
"%s.%s"
,
VCL_Name
(
vcc
)
,
matcher
);
}
AZ
(
VSB_finish
(
vsb
));
Lck_Lock
(
&
backends_mtx
);
...
...
bin/varnishd/cache/cache_vcl.c
View file @
fa6d6490
...
...
@@ -253,6 +253,13 @@ VCL_DefaultDirector(const struct VCL_conf *vcc)
return
(
*
vcc
->
default_director
);
}
const
char
*
VCL_Name
(
const
struct
VCL_conf
*
vcc
)
{
AN
(
vcc
);
return
(
vcc
->
loaded_name
);
}
/*--------------------------------------------------------------------*/
static
struct
vcl
*
...
...
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