diff --git a/src/netif/ppp/lcp.c b/src/netif/ppp/lcp.c index c8dcbf43..bbd5a41f 100644 --- a/src/netif/ppp/lcp.c +++ b/src/netif/ppp/lcp.c @@ -526,9 +526,9 @@ lcp_lowerup(unit) xmit_accm[unit][0])); #endif /* PPPOS_SUPPORT */ - if (listen_time != 0) { + if (ppp_settings.listen_time != 0) { f->flags |= DELAYED_UP; - TIMEOUTMS(lcp_delayed_up, f, listen_time); + TIMEOUTMS(lcp_delayed_up, f, ppp_settings.listen_time); } else fsm_lowerup(f); } diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 65ae4eb7..e271bc99 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -150,7 +150,6 @@ */ /* FIXME: global variables per PPP session */ /* FIXME: clean global variables */ -int listen_time; /* time to listen first (ms) */ int status; /* exit status for pppd */ /* FIXME: outpacket_buf per PPP session */ @@ -294,7 +293,6 @@ int ppp_init(void) { int i; struct protent *protp; - listen_time = 0; status = EXIT_OK; #if PPP_STATS_SUPPORT link_stats_valid = 0; diff --git a/src/netif/ppp/ppp_impl.h b/src/netif/ppp/ppp_impl.h index 0cfab303..3a2901ec 100644 --- a/src/netif/ppp/ppp_impl.h +++ b/src/netif/ppp/ppp_impl.h @@ -255,9 +255,7 @@ struct epdisc { /* * Global variables. */ -extern int listen_time; /* time to listen first (ms) */ extern int status; /* exit status for pppd */ -extern int need_holdoff; /* Need holdoff period after link terminates */ extern u_char outpacket_buf[]; /* Buffer for outgoing packets */ #ifdef HAVE_MULTILINK @@ -418,8 +416,10 @@ struct ppp_settings { u_int usepeerdns : 1; /* Ask peer for DNS adds */ u_int persist : 1; /* Persist mode, always try to reopen the connection */ + u16_t listen_time; /* time to listen first (ms) */ + /* FIXME: make it a compile time option */ - u_short idle_time_limit; /* Disconnect if idle for this many seconds */ + u16_t idle_time_limit; /* Disconnect if idle for this many seconds */ int maxconnect; /* Maximum connect time (seconds) */ char user [MAXNAMELEN + 1]; /* Username for PAP */