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
9e6f88de
Commit
9e6f88de
authored
Aug 11, 2015
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the name of the built-in directors during init
parent
9cd4a900
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
9 deletions
+12
-9
fall_back.c
lib/libvmod_directors/fall_back.c
+1
-1
hash.c
lib/libvmod_directors/hash.c
+1
-1
random.c
lib/libvmod_directors/random.c
+2
-2
round_robin.c
lib/libvmod_directors/round_robin.c
+2
-1
vdir.c
lib/libvmod_directors/vdir.c
+4
-2
vdir.h
lib/libvmod_directors/vdir.h
+2
-2
No files found.
lib/libvmod_directors/fall_back.c
View file @
9e6f88de
...
...
@@ -91,7 +91,7 @@ vmod_fallback__init(VRT_CTX,
ALLOC_OBJ
(
rr
,
VMOD_DIRECTORS_FALLBACK_MAGIC
);
AN
(
rr
);
*
rrp
=
rr
;
vdir_new
(
&
rr
->
vd
,
vcl_name
,
vmod_fallback_healthy
,
vdir_new
(
&
rr
->
vd
,
"fallback"
,
vcl_name
,
vmod_fallback_healthy
,
vmod_fallback_resolve
,
rr
);
}
...
...
lib/libvmod_directors/hash.c
View file @
9e6f88de
...
...
@@ -64,7 +64,7 @@ vmod_hash__init(VRT_CTX, struct vmod_directors_hash **rrp,
rr
->
vbm
=
vbit_init
(
8
);
AN
(
rr
->
vbm
);
*
rrp
=
rr
;
vdir_new
(
&
rr
->
vd
,
vcl_name
,
NULL
,
NULL
,
rr
);
vdir_new
(
&
rr
->
vd
,
"hash"
,
vcl_name
,
NULL
,
NULL
,
rr
);
}
VCL_VOID
__match_proto__
()
...
...
lib/libvmod_directors/random.c
View file @
9e6f88de
...
...
@@ -87,8 +87,8 @@ vmod_random__init(VRT_CTX, struct vmod_directors_random **rrp,
ALLOC_OBJ
(
rr
,
VMOD_DIRECTORS_RANDOM_MAGIC
);
AN
(
rr
);
*
rrp
=
rr
;
vdir_new
(
&
rr
->
vd
,
vcl_name
,
vmod_random_healthy
,
vmod_random_resolve
,
rr
);
vdir_new
(
&
rr
->
vd
,
"random"
,
vcl_name
,
vmod_random_healthy
,
vmod_random_resolve
,
rr
);
}
VCL_VOID
__match_proto__
()
...
...
lib/libvmod_directors/round_robin.c
View file @
9e6f88de
...
...
@@ -94,7 +94,8 @@ vmod_round_robin__init(VRT_CTX,
ALLOC_OBJ
(
rr
,
VMOD_DIRECTORS_ROUND_ROBIN_MAGIC
);
AN
(
rr
);
*
rrp
=
rr
;
vdir_new
(
&
rr
->
vd
,
vcl_name
,
vmod_rr_healthy
,
vmod_rr_resolve
,
rr
);
vdir_new
(
&
rr
->
vd
,
"round-robin"
,
vcl_name
,
vmod_rr_healthy
,
vmod_rr_resolve
,
rr
);
}
VCL_VOID
__match_proto__
()
...
...
lib/libvmod_directors/vdir.c
View file @
9e6f88de
...
...
@@ -51,11 +51,12 @@ vdir_expand(struct vdir *vd, unsigned n)
}
void
vdir_new
(
struct
vdir
**
vdp
,
const
char
*
vcl_name
,
vdi_healthy_f
*
healthy
,
vdi_resolve_f
*
resolve
,
void
*
priv
)
vdir_new
(
struct
vdir
**
vdp
,
const
char
*
name
,
const
char
*
vcl_name
,
vdi_
healthy_f
*
healthy
,
vdi_
resolve_f
*
resolve
,
void
*
priv
)
{
struct
vdir
*
vd
;
AN
(
name
);
AN
(
vcl_name
);
AN
(
vdp
);
AZ
(
*
vdp
);
...
...
@@ -66,6 +67,7 @@ vdir_new(struct vdir **vdp, const char *vcl_name, vdi_healthy_f *healthy,
ALLOC_OBJ
(
vd
->
dir
,
DIRECTOR_MAGIC
);
AN
(
vd
->
dir
);
vd
->
dir
->
name
=
name
;
REPLACE
(
vd
->
dir
->
vcl_name
,
vcl_name
);
vd
->
dir
->
priv
=
priv
;
vd
->
dir
->
healthy
=
healthy
;
...
...
lib/libvmod_directors/vdir.h
View file @
9e6f88de
...
...
@@ -41,8 +41,8 @@ struct vdir {
struct
vbitmap
*
vbm
;
};
void
vdir_new
(
struct
vdir
**
vdp
,
const
char
*
vcl_name
,
vdi_healthy_f
*
healthy
,
vdi_resolve_f
*
resolve
,
void
*
priv
);
void
vdir_new
(
struct
vdir
**
vdp
,
const
char
*
name
,
const
char
*
vcl_name
,
vdi_
healthy_f
*
healthy
,
vdi_
resolve_f
*
resolve
,
void
*
priv
);
void
vdir_delete
(
struct
vdir
**
vdp
);
void
vdir_lock
(
struct
vdir
*
vd
);
void
vdir_unlock
(
struct
vdir
*
vd
);
...
...
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