mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-04-18 14:42:21 +00:00
phase must be set to initalize each time we try to reconnect
This commit is contained in:
parent
a84f5d52ff
commit
408a56ffaf
@ -255,7 +255,6 @@ ppp_pcb *ppp_new(void) {
|
|||||||
#endif /* PPP_DEBUG */
|
#endif /* PPP_DEBUG */
|
||||||
IP4_ADDR(&pcb->addrs.netmask, 255,255,255,255);
|
IP4_ADDR(&pcb->addrs.netmask, 255,255,255,255);
|
||||||
pcb->lcp_loopbackfail = DEFLOOPBACKFAIL;
|
pcb->lcp_loopbackfail = DEFLOOPBACKFAIL;
|
||||||
new_phase(pcb, PHASE_INITIALIZE);
|
|
||||||
|
|
||||||
/* default configuration */
|
/* default configuration */
|
||||||
pcb->settings.usepeerdns = 1;
|
pcb->settings.usepeerdns = 1;
|
||||||
@ -359,6 +358,7 @@ int ppp_over_serial_open(ppp_pcb *pcb, sio_fd_t fd, ppp_link_status_cb_fn link_s
|
|||||||
* Start the connection and handle incoming events (packet or timeout).
|
* Start the connection and handle incoming events (packet or timeout).
|
||||||
*/
|
*/
|
||||||
PPPDEBUG(LOG_INFO, ("ppp_over_serial_open: unit %d: Connecting\n", pcb->num));
|
PPPDEBUG(LOG_INFO, ("ppp_over_serial_open: unit %d: Connecting\n", pcb->num));
|
||||||
|
new_phase(pcb, PHASE_INITIALIZE);
|
||||||
ppp_start(pcb);
|
ppp_start(pcb);
|
||||||
#if PPP_INPROC_OWNTHREAD
|
#if PPP_INPROC_OWNTHREAD
|
||||||
sys_thread_new(PPP_THREAD_NAME, ppp_input_thread, (void*)&pcb->rx, PPP_THREAD_STACKSIZE, PPP_THREAD_PRIO);
|
sys_thread_new(PPP_THREAD_NAME, ppp_input_thread, (void*)&pcb->rx, PPP_THREAD_STACKSIZE, PPP_THREAD_PRIO);
|
||||||
@ -417,6 +417,7 @@ int ppp_over_ethernet_open(ppp_pcb *pcb, struct netif *ethif, const char *servic
|
|||||||
return PPPERR_OPEN;
|
return PPPERR_OPEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
new_phase(pcb, PHASE_INITIALIZE);
|
||||||
pppoe_connect(pcb->pppoe_sc);
|
pppoe_connect(pcb->pppoe_sc);
|
||||||
return PPPERR_NONE;
|
return PPPERR_NONE;
|
||||||
}
|
}
|
||||||
@ -1655,6 +1656,7 @@ static void ppp_over_ethernet_link_status_cb(ppp_pcb *pcb, int state) {
|
|||||||
if(pcb->settings.persist) {
|
if(pcb->settings.persist) {
|
||||||
if(pcb->link_status_cb)
|
if(pcb->link_status_cb)
|
||||||
pcb->link_status_cb(pcb, pcb->err_code ? pcb->err_code : pppoe_err_code, pcb->link_status_ctx);
|
pcb->link_status_cb(pcb, pcb->err_code ? pcb->err_code : pppoe_err_code, pcb->link_status_ctx);
|
||||||
|
new_phase(pcb, PHASE_INITIALIZE);
|
||||||
pppoe_connect(pcb->pppoe_sc);
|
pppoe_connect(pcb->pppoe_sc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user