Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-weightadjust
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-weightadjust
Commits
528c8dcc
Commit
528c8dcc
authored
Oct 04, 2017
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add_backend layering check before weightadjust check
to be consistent with remove_backend
parent
c5710755
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
vmod_weightadjust.c
src/vmod_weightadjust.c
+8
-8
No files found.
src/vmod_weightadjust.c
View file @
528c8dcc
...
...
@@ -264,14 +264,6 @@ vmod_random_add_backend(VRT_CTX, struct vmod_weightadjust_random *rr,
wa_vcl
=
rr
->
extra
.
wa_vcl
;
CHECK_OBJ_NOTNULL
(
wa_vcl
,
VMOD_WADJ_VCL_MAGIC
);
if
(
weight_update
==
NULL
||
weight_update
[
0
]
==
'\0'
)
{
msg
(
ctx
,
0
,
"vmod weightadjust director %s "
"add_backend(%s) without weight update falls back "
"to standard behaviour"
,
rr
->
vd
->
dir
->
vcl_name
,
vcl_be
->
name
);
goto
no_weightadjust
;
}
if
(
vcl_be
->
priv
==
NULL
)
{
ERR
(
ctx
,
"can only be used with real backends "
"(no director layering)"
);
...
...
@@ -280,6 +272,14 @@ vmod_random_add_backend(VRT_CTX, struct vmod_weightadjust_random *rr,
CAST_OBJ_NOTNULL
(
be
,
vcl_be
->
priv
,
BACKEND_MAGIC
);
if
(
weight_update
==
NULL
||
weight_update
[
0
]
==
'\0'
)
{
msg
(
ctx
,
0
,
"vmod weightadjust director %s "
"add_backend(%s) without weight update falls back "
"to standard behaviour"
,
rr
->
vd
->
dir
->
vcl_name
,
vcl_be
->
name
);
goto
no_weightadjust
;
}
vdir_rdlock
(
rr
->
vd
);
nb
=
rr
->
vd
->
n_backend
;
for
(
u
=
0
;
u
<
nb
;
u
++
)
{
...
...
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