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
parent
335100c1a6
commit
807ec32c96
8
bmc.c
8
bmc.c
|
@ -114,12 +114,8 @@ enum port_state bmc_state_decision(struct clock *c, struct port *r)
|
||||||
port_best = port_best_foreign(r);
|
port_best = port_best_foreign(r);
|
||||||
ps = port_state(r);
|
ps = port_state(r);
|
||||||
|
|
||||||
if (!port_best) {
|
if (!port_best && PS_LISTENING == ps)
|
||||||
if (PS_LISTENING == ps)
|
return ps;
|
||||||
return ps;
|
|
||||||
else
|
|
||||||
return PS_FAULTY;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!clock_best)
|
if (!clock_best)
|
||||||
return PS_FAULTY;
|
return PS_FAULTY;
|
||||||
|
|
Loading…
Reference in New Issue