mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 23:15:37 +00:00
Use pppRecvWakeup only if PPP_INPROC_OWNTHREAD is defined.
Change-Id: Ie800289eb5f6a64d0be1d38eab7154d4aa473d57
This commit is contained in:
parent
ec565c8a19
commit
40a16289f7
@ -174,7 +174,7 @@ typedef struct PPPControlRx_s {
|
|||||||
/** receive buffer - encoded data is stored here */
|
/** receive buffer - encoded data is stored here */
|
||||||
#if PPP_INPROC_OWNTHREAD
|
#if PPP_INPROC_OWNTHREAD
|
||||||
u_char rxbuf[PPPOS_RX_BUFSIZE];
|
u_char rxbuf[PPPOS_RX_BUFSIZE];
|
||||||
#endif
|
#endif /* PPP_INPROC_OWNTHREAD */
|
||||||
|
|
||||||
/* The input packet. */
|
/* The input packet. */
|
||||||
struct pbuf *inHead, *inTail;
|
struct pbuf *inHead, *inTail;
|
||||||
@ -341,6 +341,7 @@ static u_char pppACCMMask[] = {
|
|||||||
0x80
|
0x80
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if PPP_INPROC_OWNTHREAD
|
||||||
/** Wake up the task blocked in reading from serial line (if any) */
|
/** Wake up the task blocked in reading from serial line (if any) */
|
||||||
static void
|
static void
|
||||||
pppRecvWakeup(int pd)
|
pppRecvWakeup(int pd)
|
||||||
@ -350,6 +351,7 @@ pppRecvWakeup(int pd)
|
|||||||
sio_read_abort(pppControl[pd].fd);
|
sio_read_abort(pppControl[pd].fd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* PPP_INPROC_OWNTHREAD */
|
||||||
#endif /* PPPOS_SUPPORT */
|
#endif /* PPPOS_SUPPORT */
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -365,7 +367,9 @@ pppLinkTerminated(int pd)
|
|||||||
{
|
{
|
||||||
#if PPPOS_SUPPORT
|
#if PPPOS_SUPPORT
|
||||||
PPPControl* pc;
|
PPPControl* pc;
|
||||||
|
#if PPP_INPROC_OWNTHREAD
|
||||||
pppRecvWakeup(pd);
|
pppRecvWakeup(pd);
|
||||||
|
#endif /* PPP_INPROC_OWNTHREAD */
|
||||||
pc = &pppControl[pd];
|
pc = &pppControl[pd];
|
||||||
|
|
||||||
PPPDEBUG(LOG_DEBUG, ("pppLinkTerminated: unit %d: linkStatusCB=%p errCode=%d\n", pd, pc->linkStatusCB, pc->errCode));
|
PPPDEBUG(LOG_DEBUG, ("pppLinkTerminated: unit %d: linkStatusCB=%p errCode=%d\n", pd, pc->linkStatusCB, pc->errCode));
|
||||||
@ -390,9 +394,9 @@ pppLinkDown(int pd)
|
|||||||
} else
|
} else
|
||||||
#endif /* PPPOE_SUPPORT */
|
#endif /* PPPOE_SUPPORT */
|
||||||
{
|
{
|
||||||
#if PPPOS_SUPPORT
|
#if PPPOS_SUPPORT && PPP_INPROC_OWNTHREAD
|
||||||
pppRecvWakeup(pd);
|
pppRecvWakeup(pd);
|
||||||
#endif /* PPPOS_SUPPORT */
|
#endif /* PPPOS_SUPPORT && PPP_INPROC_OWNTHREAD*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -576,7 +580,7 @@ pppOverSerialOpen(sio_fd_t fd, pppLinkStatusCB_fn linkStatusCB, void *linkStatus
|
|||||||
pppStart(pd);
|
pppStart(pd);
|
||||||
#if PPP_INPROC_OWNTHREAD
|
#if PPP_INPROC_OWNTHREAD
|
||||||
sys_thread_new(PPP_THREAD_NAME, pppInputThread, (void*)&pc->rx, PPP_THREAD_STACKSIZE, PPP_THREAD_PRIO);
|
sys_thread_new(PPP_THREAD_NAME, pppInputThread, (void*)&pc->rx, PPP_THREAD_STACKSIZE, PPP_THREAD_PRIO);
|
||||||
#endif
|
#endif /* PPP_INPROC_OWNTHREAD */
|
||||||
}
|
}
|
||||||
|
|
||||||
return pd;
|
return pd;
|
||||||
@ -674,7 +678,9 @@ pppClose(int pd)
|
|||||||
pc->errCode = PPPERR_USER;
|
pc->errCode = PPPERR_USER;
|
||||||
/* This will leave us at PHASE_DEAD. */
|
/* This will leave us at PHASE_DEAD. */
|
||||||
pppStop(pd);
|
pppStop(pd);
|
||||||
|
#if PPP_INPROC_OWNTHREAD
|
||||||
pppRecvWakeup(pd);
|
pppRecvWakeup(pd);
|
||||||
|
#endif /* PPP_INPROC_OWNTHREAD */
|
||||||
#endif /* PPPOS_SUPPORT */
|
#endif /* PPPOS_SUPPORT */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user