Skip to content

Commit

Permalink
Fix wrong result from the best master clock algorithm.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
richardcochran committed Jan 7, 2012
1 parent 335100c commit 807ec32
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions bmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 807ec32

Please sign in to comment.