using idle_time_limit from ppp_settings

This commit is contained in:
Sylvain Rochet 2012-06-09 14:35:06 +02:00
parent 4e7ce11684
commit becc306300
3 changed files with 3 additions and 5 deletions

View File

@ -1219,7 +1219,7 @@ np_up(unit, proto)
tlim = (*idle_time_hook)(NULL);
else
#endif /* UNUSED */
tlim = idle_time_limit;
tlim = ppp_settings.idle_time_limit;
if (tlim > 0)
TIMEOUT(check_idle, NULL, tlim);
@ -1336,7 +1336,7 @@ check_idle(arg)
} else {
#endif /* UNUSED */
itime = LWIP_MIN(idle.xmit_idle, idle.recv_idle);
tlim = idle_time_limit - itime;
tlim = ppp_settings.idle_time_limit - itime;
#if 0 /* UNUSED */
}
#endif /* UNUSED */

View File

@ -108,9 +108,7 @@ bool demand = 0; /* do dial-on-demand */
#endif /* DEMAND_SUPPORT */
#if 0
char *ipparam = NULL; /* Extra parameter for ip up/down scripts */
#endif
int idle_time_limit = 0; /* Disconnect if idle for this many seconds */
#if 0
int holdoff = 30; /* # seconds to pause before reconnecting */
bool holdoff_specified; /* true if a holdoff value has been given */
int log_to_fd = 1; /* send log messages to this fd too */

View File

@ -434,7 +434,7 @@ struct ppp_settings {
u_int usepeerdns : 1; /* Ask peer for DNS adds */
u_int persist : 1; /* Persist mode, always try to reopen the connection */
u_short idle_time_limit; /* Shut down link if idle for this long */
u_short idle_time_limit; /* Disconnect if idle for this many seconds */
int maxconnect; /* Maximum connect time (seconds) */
char user [MAXNAMELEN + 1]; /* Username for PAP */