Start P2P messages right away when listening after initializing.

Because of an oversight in the event code, a port will not send peer delay
request messages while in the initial listening state. This patch fixes
the issue by expanding this special, initial case.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2013-01-27 20:42:49 +01:00
parent b9aae07f87
commit a1cd223962
1 changed files with 3 additions and 0 deletions

3
port.c
View File

@ -1431,6 +1431,9 @@ void port_dispatch(struct port *p, enum fsm_event event, int mdiff)
next = port_initialize(p) ? PS_FAULTY : PS_LISTENING; next = port_initialize(p) ? PS_FAULTY : PS_LISTENING;
port_show_transition(p, next, event); port_show_transition(p, next, event);
p->state = next; p->state = next;
if (next == PS_LISTENING && p->delayMechanism == DM_P2P) {
port_set_delay_tmo(p);
}
return; return;
} }