summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/lcp.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-05-19 02:00:16 +0000
committerbrian <brian@FreeBSD.org>1997-05-19 02:00:16 +0000
commitee01b280507bf1f39a39f9beb574b6653321fd1c (patch)
treee4d9b90f3eb2066eb4729a5a72f4efff2a30eec9 /usr.sbin/ppp/lcp.c
parent4f2495eff057ea8a9f8c638ee404521f89177a51 (diff)
downloadFreeBSD-src-ee01b280507bf1f39a39f9beb574b6653321fd1c.zip
FreeBSD-src-ee01b280507bf1f39a39f9beb574b6653321fd1c.tar.gz
Mega update to sort out bad implementations
of reconnect & -background. o Fix reconnect anomolies. o Make reconnect apply to failed LQR hangups (& mention in man page). o Make reconnect effective in -background mode. o Listen on socket in -background mode. o Try all phone numbers in -background mode. o Insist on system arg in -background mode. o Make a control-connection close command exit in -background mode. o Output status message to stdout on exit of parent in -background mode. o Don't notify parent of success too soon. o Describe termination EX_* code. o Miscelaneous diagnostic corrections. o Remove redundant connect_time from modem.c. o Don't repeatedly DownConnection().
Diffstat (limited to 'usr.sbin/ppp/lcp.c')
-rw-r--r--usr.sbin/ppp/lcp.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c
index d3c6d7a..2cfabd7 100644
--- a/usr.sbin/ppp/lcp.c
+++ b/usr.sbin/ppp/lcp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: lcp.c,v 1.17 1997/05/11 00:41:30 ache Exp $
+ * $Id: lcp.c,v 1.18 1997/05/11 00:44:37 ache Exp $
*
* TODO:
* o Validate magic number received from peer.
@@ -124,18 +124,11 @@ int new;
IpcpOpen();
CcpUp();
CcpOpen();
- if (mode & MODE_BACKGROUND && BGFiledes[1] != -1) {
- char c = EX_NORMAL;
- if (write(BGFiledes[1],&c,1) == 1)
- LogPrintf(LOG_PHASE_BIT,"Parent notified of success.\n");
- else
- LogPrintf(LOG_PHASE_BIT,"Failed to notify parent of success.\n");
- close(BGFiledes[1]);
- BGFiledes[1] = -1;
- }
break;
case PHASE_DEAD:
- if (mode & (MODE_DIRECT|MODE_BACKGROUND))
+ if (mode & MODE_DIRECT)
+ Cleanup(EX_DEAD);
+ if (mode & MODE_BACKGROUND && !reconnectRequired)
Cleanup(EX_DEAD);
break;
}
OpenPOWER on IntegriCloud