mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
ppp: minor changes: fix some 'is unused' warning when debug is off.
This commit is contained in:
parent
e07d71f5e8
commit
03f888c968
@ -178,6 +178,8 @@ static int passwd_from_file;
|
||||
void
|
||||
link_required(int unit)
|
||||
{
|
||||
LWIP_UNUSED_ARG(unit);
|
||||
|
||||
AUTHDEBUG((LOG_INFO, "link_required: %d\n", unit));
|
||||
}
|
||||
|
||||
@ -322,6 +324,8 @@ link_established(int unit)
|
||||
void
|
||||
auth_peer_fail(int unit, u16_t protocol)
|
||||
{
|
||||
LWIP_UNUSED_ARG(protocol);
|
||||
|
||||
AUTHDEBUG((LOG_INFO, "auth_peer_fail: %d proto=%X\n", unit, protocol));
|
||||
/*
|
||||
* Authentication failure: take the link down
|
||||
@ -378,6 +382,8 @@ auth_withpeer_fail(int unit, u16_t protocol)
|
||||
{
|
||||
int errCode = PPPERR_AUTHFAIL;
|
||||
|
||||
LWIP_UNUSED_ARG(protocol);
|
||||
|
||||
AUTHDEBUG((LOG_INFO, "auth_withpeer_fail: %d proto=%X\n", unit, protocol));
|
||||
if (passwd_from_file) {
|
||||
BZERO(ppp_settings.passwd, MAXSECRETLEN);
|
||||
@ -437,6 +443,9 @@ auth_withpeer_success(int unit, u16_t protocol)
|
||||
void
|
||||
np_up(int unit, u16_t proto)
|
||||
{
|
||||
LWIP_UNUSED_ARG(unit);
|
||||
LWIP_UNUSED_ARG(proto);
|
||||
|
||||
AUTHDEBUG((LOG_INFO, "np_up: %d proto=%X\n", unit, proto));
|
||||
if (num_np_up == 0) {
|
||||
AUTHDEBUG((LOG_INFO, "np_up: maxconnect=%d idle_time_limit=%d\n",ppp_settings.maxconnect,ppp_settings.idle_time_limit));
|
||||
@ -464,6 +473,9 @@ np_up(int unit, u16_t proto)
|
||||
void
|
||||
np_down(int unit, u16_t proto)
|
||||
{
|
||||
LWIP_UNUSED_ARG(unit);
|
||||
LWIP_UNUSED_ARG(proto);
|
||||
|
||||
AUTHDEBUG((LOG_INFO, "np_down: %d proto=%X\n", unit, proto));
|
||||
if (--num_np_up == 0 && ppp_settings.idle_time_limit > 0) {
|
||||
UNTIMEOUT(check_idle, NULL);
|
||||
@ -476,6 +488,9 @@ np_down(int unit, u16_t proto)
|
||||
void
|
||||
np_finished(int unit, u16_t proto)
|
||||
{
|
||||
LWIP_UNUSED_ARG(unit);
|
||||
LWIP_UNUSED_ARG(proto);
|
||||
|
||||
AUTHDEBUG((LOG_INFO, "np_finished: %d proto=%X\n", unit, proto));
|
||||
if (--num_np_open <= 0) {
|
||||
/* no further use for the link: shut up shop. */
|
||||
@ -526,6 +541,12 @@ int
|
||||
check_passwd( int unit, char *auser, int userlen, char *apasswd, int passwdlen, char **msg, int *msglen)
|
||||
{
|
||||
#if 1
|
||||
LWIP_UNUSED_ARG(unit);
|
||||
LWIP_UNUSED_ARG(auser);
|
||||
LWIP_UNUSED_ARG(userlen);
|
||||
LWIP_UNUSED_ARG(apasswd);
|
||||
LWIP_UNUSED_ARG(passwdlen);
|
||||
LWIP_UNUSED_ARG(msglen);
|
||||
*msg = (char *) 0;
|
||||
return UPAP_AUTHACK; /* XXX Assume all entries OK. */
|
||||
#else
|
||||
@ -621,6 +642,10 @@ int get_secret( int unit, char *client, char *server, char *secret, int *secret_
|
||||
int len;
|
||||
struct wordlist *addrs;
|
||||
|
||||
LWIP_UNUSED_ARG(unit);
|
||||
LWIP_UNUSED_ARG(server);
|
||||
LWIP_UNUSED_ARG(save_addrs);
|
||||
|
||||
addrs = NULL;
|
||||
|
||||
if(!client || !client[0] || strcmp(client, ppp_settings.user)) {
|
||||
@ -846,6 +871,7 @@ null_login(int unit)
|
||||
static int
|
||||
get_pap_passwd(int unit, char *user, char *passwd)
|
||||
{
|
||||
LWIP_UNUSED_ARG(unit);
|
||||
/* normally we would reject PAP if no password is provided,
|
||||
but this causes problems with some providers (like CHT in Taiwan)
|
||||
who incorrectly request PAP and expect a bogus/empty password, so
|
||||
|
@ -638,6 +638,9 @@ ChapReceiveResponse(chap_state *cstate, u_char *inp, int id, int len)
|
||||
static void
|
||||
ChapReceiveSuccess(chap_state *cstate, u_char *inp, u_char id, int len)
|
||||
{
|
||||
LWIP_UNUSED_ARG(id);
|
||||
LWIP_UNUSED_ARG(inp);
|
||||
|
||||
CHAPDEBUG((LOG_INFO, "ChapReceiveSuccess: Rcvd id %d.\n", id));
|
||||
|
||||
if (cstate->clientstate == CHAPCS_OPEN) {
|
||||
@ -672,6 +675,9 @@ ChapReceiveSuccess(chap_state *cstate, u_char *inp, u_char id, int len)
|
||||
static void
|
||||
ChapReceiveFailure(chap_state *cstate, u_char *inp, u_char id, int len)
|
||||
{
|
||||
LWIP_UNUSED_ARG(id);
|
||||
LWIP_UNUSED_ARG(inp);
|
||||
|
||||
CHAPDEBUG((LOG_INFO, "ChapReceiveFailure: Rcvd id %d.\n", id));
|
||||
|
||||
if (cstate->clientstate != CHAPCS_RESPONSE) {
|
||||
|
@ -148,6 +148,8 @@ fsm_lowerup(fsm *f)
|
||||
{
|
||||
int oldState = f->state;
|
||||
|
||||
LWIP_UNUSED_ARG(oldState);
|
||||
|
||||
switch( f->state ) {
|
||||
case LS_INITIAL:
|
||||
f->state = LS_CLOSED;
|
||||
@ -183,6 +185,8 @@ fsm_lowerdown(fsm *f)
|
||||
{
|
||||
int oldState = f->state;
|
||||
|
||||
LWIP_UNUSED_ARG(oldState);
|
||||
|
||||
switch( f->state ) {
|
||||
case LS_CLOSED:
|
||||
f->state = LS_INITIAL;
|
||||
@ -233,6 +237,8 @@ fsm_open(fsm *f)
|
||||
{
|
||||
int oldState = f->state;
|
||||
|
||||
LWIP_UNUSED_ARG(oldState);
|
||||
|
||||
switch( f->state ) {
|
||||
case LS_INITIAL:
|
||||
f->state = LS_STARTING;
|
||||
@ -279,6 +285,8 @@ fsm_close(fsm *f, char *reason)
|
||||
{
|
||||
int oldState = f->state;
|
||||
|
||||
LWIP_UNUSED_ARG(oldState);
|
||||
|
||||
f->term_reason = reason;
|
||||
f->term_reason_len = (reason == NULL? 0: strlen(reason));
|
||||
switch( f->state ) {
|
||||
@ -747,6 +755,8 @@ fsm_rconfnakrej(fsm *f, int code, int id, u_char *inp, int len)
|
||||
static void
|
||||
fsm_rtermreq(fsm *f, int id, u_char *p, int len)
|
||||
{
|
||||
LWIP_UNUSED_ARG(p);
|
||||
|
||||
FSMDEBUG((LOG_INFO, "fsm_rtermreq(%s): Rcvd id %d state=%d (%s)\n",
|
||||
PROTO_NAME(f), id, f->state, ppperr_strerr[f->state]));
|
||||
|
||||
|
@ -466,6 +466,8 @@ upap_rauthack(upap_state *u, u_char *inp, int id, int len)
|
||||
u_char msglen;
|
||||
char *msg;
|
||||
|
||||
LWIP_UNUSED_ARG(id);
|
||||
|
||||
UPAPDEBUG((LOG_INFO, "pap_rauthack: Rcvd id %d s=%d\n", id, u->us_clientstate));
|
||||
|
||||
if (u->us_clientstate != UPAPCS_AUTHREQ) { /* XXX */
|
||||
@ -503,6 +505,8 @@ upap_rauthnak(upap_state *u, u_char *inp, int id, int len)
|
||||
u_char msglen;
|
||||
char *msg;
|
||||
|
||||
LWIP_UNUSED_ARG(id);
|
||||
|
||||
UPAPDEBUG((LOG_INFO, "pap_rauthnak: Rcvd id %d s=%d\n", id, u->us_clientstate));
|
||||
|
||||
if (u->us_clientstate != UPAPCS_AUTHREQ) { /* XXX */
|
||||
|
@ -590,6 +590,9 @@ int pppOverEthernetOpen(struct netif *ethif, const char *service_name, const cha
|
||||
PPPControl *pc;
|
||||
int pd;
|
||||
|
||||
LWIP_UNUSED_ARG(service_name);
|
||||
LWIP_UNUSED_ARG(concentrator_name);
|
||||
|
||||
/* Find a free PPP session descriptor. Critical region? */
|
||||
for (pd = 0; pd < NUM_PPP && pppControl[pd].openFlag != 0; pd++);
|
||||
if (pd >= NUM_PPP) {
|
||||
|
@ -187,7 +187,7 @@ enum NPmode {
|
||||
}
|
||||
#define PUTSHORT(s, cp) { \
|
||||
*(cp)++ = (u_char) ((s) >> 8); \
|
||||
*(cp)++ = (u_char) (s); \
|
||||
*(cp)++ = (u_char) (s & 0xff); \
|
||||
}
|
||||
|
||||
#define GETLONG(l, cp) { \
|
||||
|
@ -1201,6 +1201,8 @@ pppoe_ifattach_hook(void *arg, struct pbuf **mp, struct netif *ifp, int dir)
|
||||
static void
|
||||
pppoe_clear_softc(struct pppoe_softc *sc, const char *message)
|
||||
{
|
||||
LWIP_UNUSED_ARG(message);
|
||||
|
||||
/* stop timer */
|
||||
tcpip_untimeout(pppoe_timeout, sc);
|
||||
PPPDEBUG((LOG_DEBUG, "pppoe: %c%c%"U16_F": session 0x%x terminated, %s\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, sc->sc_session, message));
|
||||
|
Loading…
Reference in New Issue
Block a user