PPP, CORE, fixed PPP phase state machine when ppp_close() is called during HOLDOFF phase

Aborting HOLDOFF leaves us at PPP_PHASE_DEAD, fixed.
This commit is contained in:
Sylvain Rochet 2015-02-22 13:48:53 +01:00
parent ded77f59cd
commit ab572ce5b9

View File

@ -291,6 +291,7 @@ ppp_close(ppp_pcb *pcb)
/* holdoff phase, cancel the reconnection and call the status callback */
if (pcb->phase == PPP_PHASE_HOLDOFF) {
sys_untimeout(ppp_do_open, pcb);
pcb->phase = PPP_PHASE_DEAD;
pcb->link_status_cb(pcb, pcb->err_code, pcb->ctx_cb);
return ERR_OK;
}