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
90624773
Commit
90624773
authored
Nov 11, 2014
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update description
Minor cosmetic changes while here. Discussed with Dag on Frankfurt.
parent
2e9e32ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
cache_backend_cfg.c
bin/varnishd/cache/cache_backend_cfg.c
+11
-12
No files found.
bin/varnishd/cache/cache_backend_cfg.c
View file @
90624773
...
@@ -288,8 +288,8 @@ backend_find(struct cli *cli, const char *matcher, bf_func *func, void *priv)
...
@@ -288,8 +288,8 @@ backend_find(struct cli *cli, const char *matcher, bf_func *func, void *priv)
ssize_t
ip_l
=
0
;
ssize_t
ip_l
=
0
;
const
char
*
port_b
=
NULL
;
const
char
*
port_b
=
NULL
;
ssize_t
port_l
=
0
;
ssize_t
port_l
=
0
;
int
found
=
0
;
int
all
,
found
=
0
;
int
i
,
j
;
int
i
;
name_b
=
matcher
;
name_b
=
matcher
;
if
(
matcher
!=
NULL
)
{
if
(
matcher
!=
NULL
)
{
...
@@ -344,8 +344,8 @@ backend_find(struct cli *cli, const char *matcher, bf_func *func, void *priv)
...
@@ -344,8 +344,8 @@ backend_find(struct cli *cli, const char *matcher, bf_func *func, void *priv)
}
}
}
}
for
(
j
=
0
;
j
<
2
;
++
j
)
{
for
(
all
=
0
;
all
<
2
&&
found
==
0
;
all
++
)
{
if
(
j
==
0
&&
name_b
==
NULL
)
if
(
all
==
0
&&
name_b
==
NULL
)
continue
;
continue
;
VTAILQ_FOREACH
(
b
,
&
backends
,
list
)
{
VTAILQ_FOREACH
(
b
,
&
backends
,
list
)
{
CHECK_OBJ_NOTNULL
(
b
,
BACKEND_MAGIC
);
CHECK_OBJ_NOTNULL
(
b
,
BACKEND_MAGIC
);
...
@@ -355,7 +355,7 @@ backend_find(struct cli *cli, const char *matcher, bf_func *func, void *priv)
...
@@ -355,7 +355,7 @@ backend_find(struct cli *cli, const char *matcher, bf_func *func, void *priv)
if
(
name_b
!=
NULL
&&
if
(
name_b
!=
NULL
&&
strncmp
(
b
->
vcl_name
,
name_b
,
name_l
)
!=
0
)
strncmp
(
b
->
vcl_name
,
name_b
,
name_l
)
!=
0
)
continue
;
continue
;
if
(
j
==
0
&&
b
->
vcl_name
[
name_l
]
!=
'\0'
)
if
(
all
==
0
&&
b
->
vcl_name
[
name_l
]
!=
'\0'
)
continue
;
continue
;
if
(
ip_b
!=
NULL
&&
if
(
ip_b
!=
NULL
&&
(
b
->
ipv4_addr
==
NULL
||
(
b
->
ipv4_addr
==
NULL
||
...
@@ -366,9 +366,7 @@ backend_find(struct cli *cli, const char *matcher, bf_func *func, void *priv)
...
@@ -366,9 +366,7 @@ backend_find(struct cli *cli, const char *matcher, bf_func *func, void *priv)
found
++
;
found
++
;
i
=
func
(
cli
,
b
,
priv
);
i
=
func
(
cli
,
b
,
priv
);
if
(
i
)
if
(
i
)
return
(
i
);
return
(
i
);
if
(
j
==
0
)
return
(
1
);
}
}
}
}
return
(
found
);
return
(
found
);
...
@@ -473,11 +471,12 @@ cli_backend_set_health(struct cli *cli, const char * const *av, void *priv)
...
@@ -473,11 +471,12 @@ cli_backend_set_health(struct cli *cli, const char * const *av, void *priv)
/*---------------------------------------------------------------------*/
/*---------------------------------------------------------------------*/
static
struct
cli_proto
backend_cmds
[]
=
{
static
struct
cli_proto
backend_cmds
[]
=
{
{
"backend.list"
,
"backend.list"
,
{
"backend.list"
,
"backend.list
[<backend_expression>]
"
,
"
\t
List
all backends
\n
"
,
"
\t
List
backends.
"
,
0
,
1
,
""
,
cli_backend_list
},
0
,
1
,
""
,
cli_backend_list
},
{
"backend.set_health"
,
"backend.set_health matcher state"
,
{
"backend.set_health"
,
"
\t
Set health status on a backend
\n
"
,
"backend.set_health <backend_expression> <state>"
,
"
\t
Set health status on the backends."
,
2
,
2
,
""
,
cli_backend_set_health
},
2
,
2
,
""
,
cli_backend_set_health
},
{
NULL
}
{
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