diff options
author | brian <brian@FreeBSD.org> | 1997-05-14 01:18:51 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-05-14 01:18:51 +0000 |
commit | 82b9d3453b70c7b4253760d0d99bbf05ec2e590f (patch) | |
tree | b99f03dff79548ee24f43ed01997f9e85c797ac1 /usr.sbin/ppp/main.c | |
parent | 0a48c2a0e8eb9589e753ec67c9d05e964e76c931 (diff) | |
download | FreeBSD-src-82b9d3453b70c7b4253760d0d99bbf05ec2e590f.zip FreeBSD-src-82b9d3453b70c7b4253760d0d99bbf05ec2e590f.tar.gz |
Build pid_filename without a double slash.
Make ``Dial attempt'' diagnostics consistent.
Reset lostCarrier when it has reached max.
Suggested by: Kevin Street <street@iName.com>
Diffstat (limited to 'usr.sbin/ppp/main.c')
-rw-r--r-- | usr.sbin/ppp/main.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c index e4403f5..052cad1 100644 --- a/usr.sbin/ppp/main.c +++ b/usr.sbin/ppp/main.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: main.c,v 1.48 1997/05/10 03:39:53 brian Exp $ + * $Id: main.c,v 1.49 1997/05/11 10:23:16 brian Exp $ * * TODO: * o Add commands for traffic summary, version display, etc. @@ -460,7 +460,7 @@ char **argv; close(BGFiledes[0]); } - snprintf(pid_filename, sizeof (pid_filename), "%s/tun%d.pid", + snprintf(pid_filename, sizeof (pid_filename), "%stun%d.pid", _PATH_VARRUN, tunno); (void)unlink(pid_filename); @@ -768,13 +768,17 @@ DoLoop() * due to the "set reconnect" value, we'd better bring the line * back up now. */ - if (LcpFsm.state <= ST_CLOSED && dial_up != TRUE - && lostCarrier && lostCarrier <= VarReconnectTries) { + if (LcpFsm.state <= ST_CLOSED && dial_up != TRUE && lostCarrier) + if (lostCarrier <= VarReconnectTries) { LogPrintf(LOG_PHASE_BIT, "Connection lost, re-establish (%d/%d)\n", lostCarrier, VarReconnectTries); StartRedialTimer(VarReconnectTimer); dial_up = TRUE; - } + } else { + LogPrintf(LOG_PHASE_BIT, "Connection lost, maximum (%d) times\n", + VarReconnectTries); + lostCarrier = 0; + } /* * If Ip packet for output is enqueued and require dial up, |