Don't count disabled paths in mud_is_up()

This commit is contained in:
Adrien Gallouët
2016-07-29 10:31:10 +00:00
parent c1ce6c7481
commit cec0e4132e

10
mud.c
View File

@@ -833,12 +833,14 @@ int mud_is_up (struct mud *mud)
{
struct path *path;
int ret = 0;
int up = 0;
for (path = mud->path; path; path = path->next)
ret += path->state.up;
for (path = mud->path; path; path = path->next) {
if (path->state.on)
up += path->state.up;
}
return ret;
return up;
}
static