mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
PPP: removed duplicated code in ppp_close()
Looks like previous refactoring and cleaning made ppp_close() consistent for all our low level protocol backends, cleaned up duplicated code.
This commit is contained in:
parent
48f7678771
commit
b4fe72c4a2
@ -371,27 +371,9 @@ ppp_close(ppp_pcb *pcb)
|
|||||||
PPPDEBUG(LOG_DEBUG, ("ppp_close() called\n"));
|
PPPDEBUG(LOG_DEBUG, ("ppp_close() called\n"));
|
||||||
|
|
||||||
/* Disconnect */
|
/* Disconnect */
|
||||||
#if PPPOE_SUPPORT
|
PPPDEBUG(LOG_DEBUG, ("ppp_close: unit %d kill_link -> ppp_stop\n", pcb->num));
|
||||||
if (pcb->pppoe_sc) {
|
/* This will leave us at PPP_PHASE_DEAD. */
|
||||||
PPPDEBUG(LOG_DEBUG, ("ppp_close: unit %d kill_link -> ppp_stop\n", pcb->num));
|
ppp_stop(pcb);
|
||||||
/* This will leave us at PPP_PHASE_DEAD. */
|
|
||||||
ppp_stop(pcb);
|
|
||||||
} else
|
|
||||||
#endif /* PPPOE_SUPPORT */
|
|
||||||
#if PPPOL2TP_SUPPORT
|
|
||||||
if (pcb->l2tp_pcb) {
|
|
||||||
PPPDEBUG(LOG_DEBUG, ("ppp_close: unit %d kill_link -> ppp_stop\n", pcb->num));
|
|
||||||
/* This will leave us at PPP_PHASE_DEAD. */
|
|
||||||
ppp_stop(pcb);
|
|
||||||
} else
|
|
||||||
#endif /* PPPOL2TP_SUPPORT */
|
|
||||||
{
|
|
||||||
#if PPPOS_SUPPORT
|
|
||||||
PPPDEBUG(LOG_DEBUG, ("ppp_close: unit %d kill_link -> ppp_stop\n", pcb->num));
|
|
||||||
/* This will leave us at PPP_PHASE_DEAD. */
|
|
||||||
ppp_stop(pcb);
|
|
||||||
#endif /* PPPOS_SUPPORT */
|
|
||||||
}
|
|
||||||
|
|
||||||
return st;
|
return st;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user