mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-26 16:12:55 +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.
|
* physical layer down.
|
||||||
*/
|
*/
|
||||||
void link_terminated(ppp_pcb *pcb) {
|
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;
|
return;
|
||||||
new_phase(pcb, PPP_PHASE_DISCONNECT);
|
new_phase(pcb, PPP_PHASE_DISCONNECT);
|
||||||
|
|
||||||
@ -698,7 +702,11 @@ void link_down(ppp_pcb *pcb) {
|
|||||||
|
|
||||||
if (!doing_multilink) {
|
if (!doing_multilink) {
|
||||||
upper_layers_down(pcb);
|
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);
|
new_phase(pcb, PPP_PHASE_ESTABLISH);
|
||||||
}
|
}
|
||||||
/* XXX if doing_multilink, should do something to stop
|
/* 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;
|
fsm *f = &pcb->lcp_fsm;
|
||||||
int oldstate;
|
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);
|
new_phase(pcb, PPP_PHASE_TERMINATE);
|
||||||
|
|
||||||
if (f->flags & DELAYED_UP) {
|
if (f->flags & DELAYED_UP) {
|
||||||
|
Loading…
Reference in New Issue
Block a user