mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-17 08:00:48 +01:00
Prevent dial cycling on the last phone from the list, make phone list copy
This commit is contained in:
parent
cb7fddc6fa
commit
a81c9c683e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=14423
@ -18,7 +18,7 @@
|
||||
* Columbus, OH 43221
|
||||
* (614)451-1883
|
||||
*
|
||||
* $Id: chat.c,v 1.6 1996/03/08 09:03:03 ache Exp $
|
||||
* $Id: chat.c,v 1.7 1996/03/08 12:34:37 ache Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Support more UUCP compatible control sequences.
|
||||
@ -153,8 +153,10 @@ int sendmode;
|
||||
result += strlen(VarAuthKey);
|
||||
break;
|
||||
case 'T':
|
||||
if (VarNextPhone == NULL)
|
||||
VarNextPhone = VarPhoneList;
|
||||
if (VarNextPhone == NULL) {
|
||||
strcpy(VarPhoneCopy, VarPhoneList);
|
||||
VarNextPhone = VarPhoneCopy;
|
||||
}
|
||||
phone = strsep(&VarNextPhone, ":");
|
||||
bcopy(phone, result, strlen(phone));
|
||||
result += strlen(phone);
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: command.c,v 1.14 1996/01/30 20:04:28 phk Exp $
|
||||
* $Id: command.c,v 1.15 1996/03/08 09:03:04 ache Exp $
|
||||
*
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
@ -842,7 +842,8 @@ int param;
|
||||
break;
|
||||
case VAR_PHONE:
|
||||
strncpy(VarPhoneList, *argv, sizeof(VarPhoneList)-1);
|
||||
VarNextPhone = VarPhoneList;
|
||||
strcpy(VarPhoneCopy, VarPhoneList);
|
||||
VarNextPhone = VarPhoneCopy;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: vars.h,v 1.4 1995/10/08 14:57:32 amurai Exp $
|
||||
* $Id: vars.h,v 1.5 1996/03/08 09:03:09 ache Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -73,6 +73,7 @@ struct pppvars {
|
||||
char auth_key[50]; /* PAP/CHAP key */
|
||||
char auth_name[50]; /* PAP/CHAP system name */
|
||||
char phone_numbers[200]; /* Telephone Numbers */
|
||||
char phone_copy[200]; /* copy for strsep() */
|
||||
char *next_phone; /* Next phone from the list */
|
||||
char shostname[MAXHOSTNAMELEN];/* Local short Host Name */
|
||||
};
|
||||
@ -92,6 +93,7 @@ struct pppvars {
|
||||
#define VarAuthKey pppVars.auth_key
|
||||
#define VarAuthName pppVars.auth_name
|
||||
#define VarPhoneList pppVars.phone_numbers
|
||||
#define VarPhoneCopy pppVars.phone_copy
|
||||
#define VarNextPhone pppVars.next_phone
|
||||
#define VarShortHost pppVars.shostname
|
||||
#define VarRedialTimeout pppVars.redial_timeout
|
||||
|
Loading…
Reference in New Issue
Block a user