mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 03:16:18 +00:00
PPP: remove PPP_PHASE_MASTER conditions if multilink mode is disabled
PPP_PHASE_MASTER state is only used if multilink mode is enabled. Since we don't support multilink mode checking for this state only add some code for no value added at all. Build-out PPP_PHASE_MASTER state check if multilink mode is disabled.
This commit is contained in:
parent
dd0779c204
commit
5811948b0a
@ -618,7 +618,11 @@ void start_link(unit)
|
||||
* physical layer down.
|
||||
*/
|
||||
void link_terminated(ppp_pcb *pcb) {
|
||||
if (pcb->phase == PPP_PHASE_DEAD || pcb->phase == PPP_PHASE_MASTER)
|
||||
if (pcb->phase == PPP_PHASE_DEAD
|
||||
#ifdef HAVE_MULTILINK
|
||||
|| pcb->phase == PPP_PHASE_MASTER
|
||||
#endif /* HAVE_MULTILINK */
|
||||
)
|
||||
return;
|
||||
new_phase(pcb, PPP_PHASE_DISCONNECT);
|
||||
|
||||
@ -698,7 +702,11 @@ void link_down(ppp_pcb *pcb) {
|
||||
|
||||
if (!doing_multilink) {
|
||||
upper_layers_down(pcb);
|
||||
if (pcb->phase != PPP_PHASE_DEAD && pcb->phase != PPP_PHASE_MASTER)
|
||||
if (pcb->phase != PPP_PHASE_DEAD
|
||||
#ifdef HAVE_MULTILINK
|
||||
&& pcb->phase != PPP_PHASE_MASTER
|
||||
#endif /* HAVE_MULTILINK */
|
||||
)
|
||||
new_phase(pcb, PPP_PHASE_ESTABLISH);
|
||||
}
|
||||
/* XXX if doing_multilink, should do something to stop
|
||||
|
@ -423,7 +423,11 @@ void lcp_close(ppp_pcb *pcb, const char *reason) {
|
||||
fsm *f = &pcb->lcp_fsm;
|
||||
int oldstate;
|
||||
|
||||
if (pcb->phase != PPP_PHASE_DEAD && pcb->phase != PPP_PHASE_MASTER)
|
||||
if (pcb->phase != PPP_PHASE_DEAD
|
||||
#ifdef HAVE_MULTILINK
|
||||
&& pcb->phase != PPP_PHASE_MASTER
|
||||
#endif /* HAVE_MULTILINK */
|
||||
)
|
||||
new_phase(pcb, PPP_PHASE_TERMINATE);
|
||||
|
||||
if (f->flags & DELAYED_UP) {
|
||||
|
Loading…
Reference in New Issue
Block a user