mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-23 14:46:01 +00:00
Various small improvements from patch #6965 (removed _inet_ntoa, set PPP netif down before removing, change log message and comment)
This commit is contained in:
parent
b5014b0966
commit
1d5809679b
|
@ -553,7 +553,7 @@ fsm_timeout(void *arg)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
FSMDEBUG((LOG_INFO, "%s: Timeout event in state %d (%s)!\n",
|
FSMDEBUG((LOG_INFO, "%s: UNHANDLED timeout event in state %d (%s)!\n",
|
||||||
PROTO_NAME(f), f->state, ppperr_strerr[f->state]));
|
PROTO_NAME(f), f->state, ppperr_strerr[f->state]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,20 +183,7 @@ static fsm_callbacks ipcp_callbacks = { /* IPCP callback routines */
|
||||||
/*** LOCAL FUNCTION DEFINITIONS ***/
|
/*** LOCAL FUNCTION DEFINITIONS ***/
|
||||||
/**********************************/
|
/**********************************/
|
||||||
|
|
||||||
/*
|
#define inet_ntoa(addr) ip_ntoa(((struct ip_addr*)&(addr)))
|
||||||
* Non-standard inet_ntoa left here for compat with original ppp
|
|
||||||
* sources. Assumes u32_t instead of struct in_addr.
|
|
||||||
*/
|
|
||||||
|
|
||||||
char *
|
|
||||||
_inet_ntoa(u32_t n)
|
|
||||||
{
|
|
||||||
struct in_addr ia;
|
|
||||||
ia.s_addr = n;
|
|
||||||
return inet_ntoa(ia);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define inet_ntoa _inet_ntoa
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ipcp_init - Initialize IPCP.
|
* ipcp_init - Initialize IPCP.
|
||||||
|
|
|
@ -584,7 +584,7 @@ int pppOverEthernetOpen(struct netif *ethif, const char *service_name, const cha
|
||||||
pppControl[pd].openFlag = !0;
|
pppControl[pd].openFlag = !0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Launch a deamon thread. */
|
/* PPP session descriptor found, start PPPoE */
|
||||||
if (pd >= 0) {
|
if (pd >= 0) {
|
||||||
|
|
||||||
pppControl[pd].openFlag = 1;
|
pppControl[pd].openFlag = 1;
|
||||||
|
@ -1369,6 +1369,8 @@ sifdown(int pd)
|
||||||
PPPDEBUG((LOG_WARNING, "sifdown[%d]: bad parms\n", pd));
|
PPPDEBUG((LOG_WARNING, "sifdown[%d]: bad parms\n", pd));
|
||||||
} else {
|
} else {
|
||||||
pc->if_up = 0;
|
pc->if_up = 0;
|
||||||
|
/* make sure the netif status callback is called */
|
||||||
|
netif_set_down(&pc->netif);
|
||||||
netif_remove(&pc->netif);
|
netif_remove(&pc->netif);
|
||||||
PPPDEBUG((LOG_DEBUG, "sifdown: unit %d: linkStatusCB=%lx errCode=%d\n", pd, pc->linkStatusCB, pc->errCode));
|
PPPDEBUG((LOG_DEBUG, "sifdown: unit %d: linkStatusCB=%lx errCode=%d\n", pd, pc->linkStatusCB, pc->errCode));
|
||||||
if(pc->linkStatusCB) {
|
if(pc->linkStatusCB) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user