Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-cluster
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-cluster
Commits
329c810f
Commit
329c810f
authored
Mar 20, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
polish argstruct conversion
parent
52ff0015
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
21 deletions
+16
-21
vmod_cluster.c
src/vmod_cluster.c
+16
-21
No files found.
src/vmod_cluster.c
View file @
329c810f
...
...
@@ -591,22 +591,25 @@ cluster_choose(VRT_CTX,
return
(
decide
(
ctx
,
pr
,
resolve
,
decision
));
}
#define arg2csarg(arg) {{ \
.valid_deny = arg->valid_deny, \
.valid_real = arg->valid_real, \
.valid_uncacheable_direct = arg->valid_uncacheable_direct, \
.deny = arg->deny, \
.real = arg->real, \
.uncacheable_direct = arg->uncacheable_direct \
}}
VCL_BACKEND
vmod_cluster_backend
(
VRT_CTX
,
struct
vmod_cluster_cluster
*
vc
,
struct
VARGS
(
cluster_backend
)
*
arg
)
{
enum
resolve_e
res
=
parse_resolve_e
(
arg
->
resolve
);
struct
VARGS
(
cluster_cluster_selected
)
carg
[
1
]
=
{{
.
valid_deny
=
arg
->
valid_deny
,
.
valid_real
=
arg
->
valid_real
,
.
valid_uncacheable_direct
=
arg
->
valid_uncacheable_direct
,
.
deny
=
arg
->
deny
,
.
real
=
arg
->
real
,
.
uncacheable_direct
=
arg
->
uncacheable_direct
}};
return
(
cluster_choose
(
ctx
,
vc
,
res
,
NULL
,
carg
));
struct
VARGS
(
cluster_cluster_selected
)
csarg
[
1
]
=
arg2csarg
(
arg
);
return
(
cluster_choose
(
ctx
,
vc
,
res
,
NULL
,
csarg
));
}
static
enum
decision_e
...
...
@@ -655,17 +658,9 @@ vmod_cluster_real_selected(VRT_CTX,
struct
VARGS
(
cluster_real_selected
)
*
arg
)
{
enum
decision_e
decision
;
struct
VARGS
(
cluster_cluster_selected
)
carg
[
1
]
=
{{
.
valid_deny
=
arg
->
valid_deny
,
.
valid_real
=
arg
->
valid_real
,
.
valid_uncacheable_direct
=
arg
->
valid_uncacheable_direct
,
.
deny
=
arg
->
deny
,
.
real
=
arg
->
real
,
.
uncacheable_direct
=
arg
->
uncacheable_direct
}};
decision
=
cluster_selected
(
ctx
,
"real_selected"
,
vc
,
carg
);
struct
VARGS
(
cluster_cluster_selected
)
csarg
[
1
]
=
arg2csarg
(
arg
);
decision
=
cluster_selected
(
ctx
,
"real_selected"
,
vc
,
csarg
);
if
(
decision
==
D_NULL
)
return
(
0
);
...
...
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