Fix wrong result from the best master clock algorithm.

The BMC should never return 'faulty', and I don't know what I was thinking
here, so let's just fix it.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2012-01-01 19:39:20 +01:00
parent 335100c1a6
commit 807ec32c96
1 changed files with 2 additions and 6 deletions

8
bmc.c
View File

@ -114,12 +114,8 @@ enum port_state bmc_state_decision(struct clock *c, struct port *r)
port_best = port_best_foreign(r);
ps = port_state(r);
if (!port_best) {
if (PS_LISTENING == ps)
return ps;
else
return PS_FAULTY;
}
if (!port_best && PS_LISTENING == ps)
return ps;
if (!clock_best)
return PS_FAULTY;