Make -background option attempt each phone number at most
once. Make -background ignore redial. Output exit value to syslog with "PPP Terminated" message.
This commit is contained in:
parent
c0139fb2e2
commit
4ed9958f49
@ -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.41 1997/04/09 17:35:54 ache Exp $
|
||||
* $Id: main.c,v 1.42 1997/04/12 22:58:39 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Add commands for traffic summary, version display, etc.
|
||||
@ -172,7 +172,7 @@ int excode;
|
||||
LogPrintf(LOG_PHASE_BIT,"Failed to notify parent of failure.\n");
|
||||
close(BGFiledes[1]);
|
||||
}
|
||||
LogPrintf(LOG_PHASE_BIT, "PPP Terminated.\n");
|
||||
LogPrintf(LOG_PHASE_BIT, "PPP Terminated %d.\n",excode);
|
||||
LogClose();
|
||||
if (server >= 0) {
|
||||
close(server);
|
||||
@ -775,7 +775,12 @@ DoLoop()
|
||||
tries = 0;
|
||||
} else {
|
||||
CloseModem();
|
||||
if (VarDialTries && tries >= VarDialTries) {
|
||||
if (mode & MODE_BACKGROUND) {
|
||||
if (VarNextPhone == NULL)
|
||||
Cleanup(EX_DIAL); /* Tried all numbers - no luck */
|
||||
else
|
||||
sleep(1); /* Try all numbers in background mode */
|
||||
} else if (VarDialTries && tries >= VarDialTries) {
|
||||
/* I give up ! Can't get through :( */
|
||||
StartRedialTimer();
|
||||
dial_up = FALSE;
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: modem.c,v 1.31 1997/03/10 06:54:58 ache Exp $
|
||||
* $Id: modem.c,v 1.32 1997/03/31 22:51:00 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -763,11 +763,6 @@ DialModem()
|
||||
}
|
||||
}
|
||||
HangupModem(0);
|
||||
if (mode & MODE_BACKGROUND) {
|
||||
extern void Cleanup();
|
||||
CloseModem();
|
||||
Cleanup(excode);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" manual page [] for ppp 0.94 beta2 + alpha
|
||||
.\" $Id: ppp.8,v 1.26 1997/03/13 21:39:41 brian Exp $
|
||||
.\" $Id: ppp.8,v 1.27 1997/04/12 22:58:41 brian Exp $
|
||||
.Dd 20 September 1995
|
||||
.Os FreeBSD
|
||||
.Dt PPP 8
|
||||
@ -432,7 +432,14 @@ dial mode on both ends of the link. If each end has the same timeout,
|
||||
both ends wind up calling each other at the same time if the link
|
||||
drops and both ends have packets queued.
|
||||
|
||||
To terminate the program, type
|
||||
The
|
||||
.Dq set redial
|
||||
command is ineffective if the
|
||||
.Fl background
|
||||
flag is specified. For background mode, all phone numbers are dialed
|
||||
at most once until a connection is made.
|
||||
|
||||
To terminate the program, type
|
||||
|
||||
PPP ON tama> close
|
||||
ppp ON tama> quit all
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" manual page [] for ppp 0.94 beta2 + alpha
|
||||
.\" $Id: ppp.8,v 1.26 1997/03/13 21:39:41 brian Exp $
|
||||
.\" $Id: ppp.8,v 1.27 1997/04/12 22:58:41 brian Exp $
|
||||
.Dd 20 September 1995
|
||||
.Os FreeBSD
|
||||
.Dt PPP 8
|
||||
@ -432,7 +432,14 @@ dial mode on both ends of the link. If each end has the same timeout,
|
||||
both ends wind up calling each other at the same time if the link
|
||||
drops and both ends have packets queued.
|
||||
|
||||
To terminate the program, type
|
||||
The
|
||||
.Dq set redial
|
||||
command is ineffective if the
|
||||
.Fl background
|
||||
flag is specified. For background mode, all phone numbers are dialed
|
||||
at most once until a connection is made.
|
||||
|
||||
To terminate the program, type
|
||||
|
||||
PPP ON tama> close
|
||||
ppp ON tama> quit all
|
||||
|
Loading…
x
Reference in New Issue
Block a user