summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/chat.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-08-17 20:38:45 +0000
committerbrian <brian@FreeBSD.org>1997-08-17 20:38:45 +0000
commit6f340c20e5d94d59afcee4b5d8fbc86d25acd2dd (patch)
tree62de69ed379cc36f733baf0513da2822d43d6bc4 /usr.sbin/ppp/chat.c
parent7708b374b9944a9913eb0e8d0fa451751bdaa232 (diff)
downloadFreeBSD-src-6f340c20e5d94d59afcee4b5d8fbc86d25acd2dd.zip
FreeBSD-src-6f340c20e5d94d59afcee4b5d8fbc86d25acd2dd.tar.gz
Allow specification of fallback phone numbers to
be used only if the dial script fails. PR: 4262
Diffstat (limited to 'usr.sbin/ppp/chat.c')
-rw-r--r--usr.sbin/ppp/chat.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c
index ff5922f..5810441 100644
--- a/usr.sbin/ppp/chat.c
+++ b/usr.sbin/ppp/chat.c
@@ -18,7 +18,7 @@
* Columbus, OH 43221
* (614)451-1883
*
- * $Id: chat.c,v 1.28 1997/07/01 21:31:21 brian Exp $
+ * $Id: chat.c,v 1.29 1997/07/14 01:41:24 brian Exp $
*
* TODO:
* o Support more UUCP compatible control sequences.
@@ -164,11 +164,14 @@ ExpandString(char *str, char *result, int reslen, int sendmode)
result += strlen(result);
break;
case 'T':
- if (VarNextPhone == NULL) {
- strcpy(VarPhoneCopy, VarPhoneList);
- VarNextPhone = VarPhoneCopy;
+ if (VarAltPhone == NULL) {
+ if (VarNextPhone == NULL) {
+ strcpy(VarPhoneCopy, VarPhoneList);
+ VarNextPhone = VarPhoneCopy;
+ }
+ VarAltPhone = strsep(&VarNextPhone, ":");
}
- phone = strsep(&VarNextPhone, ":");
+ phone = strsep(&VarAltPhone, "|");
strncpy(result, phone, reslen);
reslen -= strlen(result);
result += strlen(result);
OpenPOWER on IntegriCloud