From bd52968d26311964fedc5301c206df302f372273 Mon Sep 17 00:00:00 2001 From: brian Date: Tue, 4 Nov 1997 01:17:05 +0000 Subject: Introduce [local] to "set log [local] ...". This spits logging out to the screen in terminal mode - should be good for installation problem diagnosis. --- usr.sbin/ppp/systems.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'usr.sbin/ppp/systems.c') diff --git a/usr.sbin/ppp/systems.c b/usr.sbin/ppp/systems.c index 4eddc6f..79ca8a8 100644 --- a/usr.sbin/ppp/systems.c +++ b/usr.sbin/ppp/systems.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: systems.c,v 1.16 1997/09/04 00:38:21 brian Exp $ + * $Id: systems.c,v 1.17 1997/10/26 01:03:48 brian Exp $ * * TODO: */ @@ -139,7 +139,7 @@ SelectSystem(char *name, char *file) { FILE *fp; char *cp, *wp; - int n; + int n, len; u_char olauth; char line[200]; char filename[200]; @@ -189,12 +189,19 @@ SelectSystem(char *name, char *file) if (*cp == ' ' || *cp == '\t') { n = strspn(cp, " \t"); cp += n; + len = strlen(cp); + if (!len) + continue; + if (cp[len-1] == '\n') + cp[--len] = '\0'; + if (!len) + continue; LogPrintf(LogCOMMAND, "%s: %s\n", name, cp); SetPppId(); olauth = VarLocalAuth; if (VarLocalAuth == LOCAL_NO_AUTH) VarLocalAuth = LOCAL_AUTH; - DecodeCommand(cp, strlen(cp), 0); + DecodeCommand(cp, len, 0); VarLocalAuth = olauth; SetUserId(); } else if (*cp == '#') { -- cgit v1.1