From 4feb2f9c7555b299d299f3c7ff031623987361ac Mon Sep 17 00:00:00 2001 From: brian Date: Wed, 12 Nov 1997 16:34:51 +0000 Subject: [PATCH] Don't attempt to dial if "dial label" has specified a restricted label. --- usr.sbin/ppp/command.c | 6 +++--- usr.sbin/ppp/systems.c | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 83d426db08d..f08421ce047 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -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.98 1997/11/11 22:58:10 brian Exp $ + * $Id: command.c,v 1.99 1997/11/12 02:10:05 brian Exp $ * */ #include @@ -155,8 +155,8 @@ DialCommand(struct cmdtab const * cmdlist, int argc, char **argv) return 0; } - if (argc > 0 && LoadCommand(cmdlist, argc, argv) == -1) - return -1; + if (argc > 0 && (res = LoadCommand(cmdlist, argc, argv)) != 0) + return res; tries = 0; do { diff --git a/usr.sbin/ppp/systems.c b/usr.sbin/ppp/systems.c index a070535189a..b7ed109a6f1 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.23 1997/11/11 22:58:13 brian Exp $ + * $Id: systems.c,v 1.24 1997/11/12 15:50:38 brian Exp $ * * TODO: */ @@ -350,9 +350,10 @@ LoadCommand(struct cmdtab const * list, int argc, char **argv) else name = "default"; - if (!ValidSystem(name)) + if (!ValidSystem(name)) { LogPrintf(LogERROR, "%s: Label not allowed\n", name); - else if (SelectSystem(name, CONFFILE) < 0) { + return 1; + } else if (SelectSystem(name, CONFFILE) < 0) { LogPrintf(LogWARN, "%s: not found.\n", name); return -1; } else -- 2.45.2