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:
goldsimon 2009-12-06 11:59:56 +00:00
parent b5014b0966
commit 1d5809679b
3 changed files with 5 additions and 16 deletions

View File

@ -553,7 +553,7 @@ fsm_timeout(void *arg)
break;
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]));
}
}

View File

@ -183,20 +183,7 @@ static fsm_callbacks ipcp_callbacks = { /* IPCP callback routines */
/*** LOCAL FUNCTION DEFINITIONS ***/
/**********************************/
/*
* 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
#define inet_ntoa(addr) ip_ntoa(((struct ip_addr*)&(addr)))
/*
* ipcp_init - Initialize IPCP.

View File

@ -584,7 +584,7 @@ int pppOverEthernetOpen(struct netif *ethif, const char *service_name, const cha
pppControl[pd].openFlag = !0;
}
/* Launch a deamon thread. */
/* PPP session descriptor found, start PPPoE */
if (pd >= 0) {
pppControl[pd].openFlag = 1;
@ -1369,6 +1369,8 @@ sifdown(int pd)
PPPDEBUG((LOG_WARNING, "sifdown[%d]: bad parms\n", pd));
} else {
pc->if_up = 0;
/* make sure the netif status callback is called */
netif_set_down(&pc->netif);
netif_remove(&pc->netif);
PPPDEBUG((LOG_DEBUG, "sifdown: unit %d: linkStatusCB=%lx errCode=%d\n", pd, pc->linkStatusCB, pc->errCode));
if(pc->linkStatusCB) {