Don't count disabled paths in mud_is_up()
This commit is contained in:
10
mud.c
10
mud.c
@@ -833,12 +833,14 @@ int mud_is_up (struct mud *mud)
|
|||||||
{
|
{
|
||||||
struct path *path;
|
struct path *path;
|
||||||
|
|
||||||
int ret = 0;
|
int up = 0;
|
||||||
|
|
||||||
for (path = mud->path; path; path = path->next)
|
for (path = mud->path; path; path = path->next) {
|
||||||
ret += path->state.up;
|
if (path->state.on)
|
||||||
|
up += path->state.up;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return up;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
|
|||||||
Reference in New Issue
Block a user