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
e1f2e3d6
Commit
e1f2e3d6
authored
Mar 09, 2018
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify vmod_shard_backend() LAZY handling
parent
b12b8294
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
vmod_shard.c
lib/libvmod_directors/vmod_shard.c
+8
-15
No files found.
lib/libvmod_directors/vmod_shard.c
View file @
e1f2e3d6
...
@@ -606,27 +606,20 @@ vmod_shard_backend(VRT_CTX, struct vmod_directors_shard *vshard,
...
@@ -606,27 +606,20 @@ vmod_shard_backend(VRT_CTX, struct vmod_directors_shard *vshard,
switch
(
resolve
)
{
switch
(
resolve
)
{
case
LAZY
:
case
LAZY
:
if
((
args
&
~
arg_resolve
)
==
0
)
{
AN
(
vshard
->
dir
);
return
(
vshard
->
dir
);
}
if
((
ctx
->
method
&
VCL_MET_TASK_B
)
==
0
)
{
if
((
ctx
->
method
&
VCL_MET_TASK_B
)
==
0
)
{
if
((
args
&
~
arg_resolve
)
!=
0
)
{
VRT_fail
(
ctx
,
"shard .backend resolve=LAZY with other "
VRT_fail
(
ctx
,
"parameters can only be used in backend "
"shard .backend resolve=LAZY "
"with other parameters can "
"only be used in backend "
"context"
);
"context"
);
return
(
NULL
);
return
(
NULL
);
}
}
AN
(
vshard
->
dir
);
return
(
vshard
->
dir
);
}
assert
(
ctx
->
method
&
VCL_MET_TASK_B
);
assert
(
ctx
->
method
&
VCL_MET_TASK_B
);
if
((
args
&
~
arg_resolve
)
==
0
)
{
/* no other parameters - shortcut */
AN
(
vshard
->
dir
);
return
(
vshard
->
dir
);
}
pp
=
shard_param_task
(
ctx
,
vshard
,
vshard
->
param
);
pp
=
shard_param_task
(
ctx
,
vshard
,
vshard
->
param
);
if
(
pp
==
NULL
)
if
(
pp
==
NULL
)
return
(
NULL
);
return
(
NULL
);
...
...
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