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
c9d3b3ff
Commit
c9d3b3ff
authored
Apr 27, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change from "struct director *" to VCL_BACKEND (=constify)
parent
a59d33e4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
17 deletions
+19
-17
cache_backend.c
bin/varnishd/cache/cache_backend.c
+7
-5
cache_varnishd.h
bin/varnishd/cache/cache_varnishd.h
+1
-1
cache_vcl_vrt.c
bin/varnishd/cache/cache_vcl_vrt.c
+1
-1
vrt.h
include/vrt.h
+4
-4
generate.py
lib/libvcc/generate.py
+1
-1
vcc_backend.c
lib/libvcc/vcc_backend.c
+1
-1
vmod_debug_dyn.c
lib/libvmod_debug/vmod_debug_dyn.c
+4
-4
No files found.
bin/varnishd/cache/cache_backend.c
View file @
c9d3b3ff
...
@@ -448,12 +448,13 @@ VRT_backend_vsm_need(VRT_CTX)
...
@@ -448,12 +448,13 @@ VRT_backend_vsm_need(VRT_CTX)
return
(
VRT_VSC_Overhead
(
VSC_vbe_size
));
return
(
VRT_VSC_Overhead
(
VSC_vbe_size
));
}
}
struct
director
*
v_matchproto_
()
VCL_BACKEND
v_matchproto_
()
VRT_new_backend_clustered
(
VRT_CTX
,
struct
vsmw_cluster
*
vc
,
VRT_new_backend_clustered
(
VRT_CTX
,
struct
vsmw_cluster
*
vc
,
const
struct
vrt_backend
*
vrt
)
const
struct
vrt_backend
*
vrt
)
{
{
struct
backend
*
be
;
struct
backend
*
be
;
struct
director
*
d
;
struct
director
*
d
;
VCL_BACKEND
bb
;
struct
vcl
*
vcl
;
struct
vcl
*
vcl
;
const
struct
vrt_backend_probe
*
vbp
;
const
struct
vrt_backend_probe
*
vbp
;
int
retval
;
int
retval
;
...
@@ -493,7 +494,8 @@ VRT_new_backend_clustered(VRT_CTX, struct vsmw_cluster *vc,
...
@@ -493,7 +494,8 @@ VRT_new_backend_clustered(VRT_CTX, struct vsmw_cluster *vc,
retval
=
VRT_AddDirector
(
ctx
,
d
,
"%s"
,
vrt
->
vcl_name
);
retval
=
VRT_AddDirector
(
ctx
,
d
,
"%s"
,
vrt
->
vcl_name
);
if
(
retval
)
{
if
(
retval
)
{
VRT_delete_backend
(
ctx
,
&
d
);
bb
=
d
;
VRT_delete_backend
(
ctx
,
&
bb
);
return
(
NULL
);
return
(
NULL
);
}
}
...
@@ -516,7 +518,7 @@ VRT_new_backend_clustered(VRT_CTX, struct vsmw_cluster *vc,
...
@@ -516,7 +518,7 @@ VRT_new_backend_clustered(VRT_CTX, struct vsmw_cluster *vc,
return
(
d
);
return
(
d
);
}
}
struct
director
*
v_matchproto_
()
VCL_BACKEND
v_matchproto_
()
VRT_new_backend
(
VRT_CTX
,
const
struct
vrt_backend
*
vrt
)
VRT_new_backend
(
VRT_CTX
,
const
struct
vrt_backend
*
vrt
)
{
{
return
(
VRT_new_backend_clustered
(
ctx
,
NULL
,
vrt
));
return
(
VRT_new_backend_clustered
(
ctx
,
NULL
,
vrt
));
...
@@ -528,9 +530,9 @@ VRT_new_backend(VRT_CTX, const struct vrt_backend *vrt)
...
@@ -528,9 +530,9 @@ VRT_new_backend(VRT_CTX, const struct vrt_backend *vrt)
*/
*/
void
void
VRT_delete_backend
(
VRT_CTX
,
struct
director
*
*
dp
)
VRT_delete_backend
(
VRT_CTX
,
VCL_BACKEND
*
dp
)
{
{
struct
director
*
d
;
VCL_BACKEND
d
;
struct
backend
*
be
;
struct
backend
*
be
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
bin/varnishd/cache/cache_varnishd.h
View file @
c9d3b3ff
...
@@ -385,7 +385,7 @@ enum vry_finish_flag { KEEP, DISCARD };
...
@@ -385,7 +385,7 @@ enum vry_finish_flag { KEEP, DISCARD };
void
VRY_Finish
(
struct
req
*
req
,
enum
vry_finish_flag
);
void
VRY_Finish
(
struct
req
*
req
,
enum
vry_finish_flag
);
/* cache_vcl.c */
/* cache_vcl.c */
struct
director
*
VCL_DefaultDirector
(
const
struct
vcl
*
);
VCL_BACKEND
VCL_DefaultDirector
(
const
struct
vcl
*
);
const
struct
vrt_backend_probe
*
VCL_DefaultProbe
(
const
struct
vcl
*
);
const
struct
vrt_backend_probe
*
VCL_DefaultProbe
(
const
struct
vcl
*
);
void
VCL_Init
(
void
);
void
VCL_Init
(
void
);
void
VCL_Panic
(
struct
vsb
*
,
const
struct
vcl
*
);
void
VCL_Panic
(
struct
vsb
*
,
const
struct
vcl
*
);
...
...
bin/varnishd/cache/cache_vcl_vrt.c
View file @
c9d3b3ff
...
@@ -210,7 +210,7 @@ VRT_DelDirector(struct director *d)
...
@@ -210,7 +210,7 @@ VRT_DelDirector(struct director *d)
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
struct
director
*
VCL_BACKEND
VCL_DefaultDirector
(
const
struct
vcl
*
vcl
)
VCL_DefaultDirector
(
const
struct
vcl
*
vcl
)
{
{
...
...
include/vrt.h
View file @
c9d3b3ff
...
@@ -406,12 +406,12 @@ VCL_VOID VRT_Rollback(VRT_CTX, VCL_HTTP);
...
@@ -406,12 +406,12 @@ VCL_VOID VRT_Rollback(VRT_CTX, VCL_HTTP);
VCL_VOID
VRT_synth_page
(
VRT_CTX
,
const
char
*
,
...);
VCL_VOID
VRT_synth_page
(
VRT_CTX
,
const
char
*
,
...);
/* Backend related */
/* Backend related */
struct
director
*
VRT_new_backend
(
VRT_CTX
,
const
struct
vrt_backend
*
);
VCL_BACKEND
VRT_new_backend
(
VRT_CTX
,
const
struct
vrt_backend
*
);
struct
director
*
VRT_new_backend_clustered
(
VRT_CTX
,
VCL_BACKEND
VRT_new_backend_clustered
(
VRT_CTX
,
struct
vsmw_cluster
*
,
const
struct
vrt_backend
*
);
struct
vsmw_cluster
*
,
const
struct
vrt_backend
*
);
size_t
VRT_backend_vsm_need
(
VRT_CTX
);
size_t
VRT_backend_vsm_need
(
VRT_CTX
);
void
VRT_delete_backend
(
VRT_CTX
,
struct
director
*
*
);
void
VRT_delete_backend
(
VRT_CTX
,
VCL_BACKEND
*
);
int
VRT_backend_healthy
(
VRT_CTX
,
struct
director
*
);
int
VRT_backend_healthy
(
VRT_CTX
,
VCL_BACKEND
);
/* VSM related */
/* VSM related */
struct
vsmw_cluster
*
VRT_VSM_Cluster_New
(
VRT_CTX
,
size_t
);
struct
vsmw_cluster
*
VRT_VSM_Cluster_New
(
VRT_CTX
,
size_t
);
...
...
lib/libvcc/generate.py
View file @
c9d3b3ff
...
@@ -656,7 +656,7 @@ struct VCL_conf {
...
@@ -656,7 +656,7 @@ struct VCL_conf {
#define VCL_CONF_MAGIC 0x7406c509 /* from /dev/random */
#define VCL_CONF_MAGIC 0x7406c509 /* from /dev/random */
unsigned syntax;
unsigned syntax;
struct director *
*default_director;
VCL_BACKEND
*default_director;
const struct vrt_backend_probe *default_probe;
const struct vrt_backend_probe *default_probe;
unsigned nref;
unsigned nref;
const struct vrt_ref *ref;
const struct vrt_ref *ref;
...
...
lib/libvcc/vcc_backend.c
View file @
c9d3b3ff
...
@@ -547,7 +547,7 @@ vcc_ParseBackend(struct vcc *tl)
...
@@ -547,7 +547,7 @@ vcc_ParseBackend(struct vcc *tl)
sym
->
noref
=
1
;
sym
->
noref
=
1
;
}
}
}
}
Fh
(
tl
,
0
,
"
\n
static
struct director *
%s;
\n
"
,
dn
);
Fh
(
tl
,
0
,
"
\n
static
VCL_BACKEND
%s;
\n
"
,
dn
);
vcc_ParseHostDef
(
tl
,
t_be
,
dn
);
vcc_ParseHostDef
(
tl
,
t_be
,
dn
);
if
(
tl
->
err
)
{
if
(
tl
->
err
)
{
VSB_printf
(
tl
->
sb
,
VSB_printf
(
tl
->
sb
,
...
...
lib/libvmod_debug/vmod_debug_dyn.c
View file @
c9d3b3ff
...
@@ -48,7 +48,7 @@ struct xyzzy_debug_dyn {
...
@@ -48,7 +48,7 @@ struct xyzzy_debug_dyn {
#define VMOD_DEBUG_DYN_MAGIC 0x9b77ccbd
#define VMOD_DEBUG_DYN_MAGIC 0x9b77ccbd
pthread_mutex_t
mtx
;
pthread_mutex_t
mtx
;
char
*
vcl_name
;
char
*
vcl_name
;
struct
director
*
dir
;
VCL_BACKEND
dir
;
};
};
struct
xyzzy_debug_dyn_uds
{
struct
xyzzy_debug_dyn_uds
{
...
@@ -56,7 +56,7 @@ struct xyzzy_debug_dyn_uds {
...
@@ -56,7 +56,7 @@ struct xyzzy_debug_dyn_uds {
#define VMOD_DEBUG_UDS_MAGIC 0x6c7370e6
#define VMOD_DEBUG_UDS_MAGIC 0x6c7370e6
pthread_mutex_t
mtx
;
pthread_mutex_t
mtx
;
char
*
vcl_name
;
char
*
vcl_name
;
struct
director
*
dir
;
VCL_BACKEND
dir
;
};
};
static
void
static
void
...
@@ -65,7 +65,7 @@ dyn_dir_init(VRT_CTX, struct xyzzy_debug_dyn *dyn,
...
@@ -65,7 +65,7 @@ dyn_dir_init(VRT_CTX, struct xyzzy_debug_dyn *dyn,
{
{
struct
addrinfo
hints
,
*
res
=
NULL
;
struct
addrinfo
hints
,
*
res
=
NULL
;
struct
suckaddr
*
sa
;
struct
suckaddr
*
sa
;
struct
director
*
dir
,
*
dir2
;
VCL_BACKEND
dir
,
dir2
;
struct
vrt_backend
vrt
;
struct
vrt_backend
vrt
;
CHECK_OBJ_NOTNULL
(
dyn
,
VMOD_DEBUG_DYN_MAGIC
);
CHECK_OBJ_NOTNULL
(
dyn
,
VMOD_DEBUG_DYN_MAGIC
);
...
@@ -183,7 +183,7 @@ xyzzy_dyn_refresh(VRT_CTX, struct xyzzy_debug_dyn *dyn,
...
@@ -183,7 +183,7 @@ xyzzy_dyn_refresh(VRT_CTX, struct xyzzy_debug_dyn *dyn,
static
int
static
int
dyn_uds_init
(
VRT_CTX
,
struct
xyzzy_debug_dyn_uds
*
uds
,
VCL_STRING
path
)
dyn_uds_init
(
VRT_CTX
,
struct
xyzzy_debug_dyn_uds
*
uds
,
VCL_STRING
path
)
{
{
struct
director
*
dir
,
*
dir2
;
VCL_BACKEND
dir
,
dir2
;
struct
vrt_backend
vrt
;
struct
vrt_backend
vrt
;
struct
stat
st
;
struct
stat
st
;
...
...
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