port: Fix for inhibit_announce.

When inhibit_announce is set, ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES event is
still sent once every state change. Avoid this by explicitly sending
EV_NONE instead.

[ RC - Simplify and keep all of the timer's state maintenance. ]

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Vedang Patel 2018-11-14 14:10:04 -08:00 committed by Richard Cochran
parent 563c52b833
commit d1ce07d5cb
1 changed files with 4 additions and 0 deletions

4
port.c
View File

@ -2510,6 +2510,10 @@ static enum fsm_event bc_event(struct port *p, int fd_index)
port_renew_transport(p)) { port_renew_transport(p)) {
return EV_FAULT_DETECTED; return EV_FAULT_DETECTED;
} }
if (p->inhibit_announce) {
return EV_NONE;
}
return EV_ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES; return EV_ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES;
case FD_DELAY_TIMER: case FD_DELAY_TIMER: