summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/command.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1999-12-20 20:30:02 +0000
committerBrian Somers <brian@FreeBSD.org>1999-12-20 20:30:02 +0000
commitc39aa54ec8245817e058c8493f4cf7236bf24a96 (patch)
tree79473fcd22a6de4338767dba560d8e734c07e96e /usr.sbin/ppp/command.c
parentdae8dd31bfc823983560043720b6b80b9e749290 (diff)
Notes
Diffstat (limited to 'usr.sbin/ppp/command.c')
-rw-r--r--usr.sbin/ppp/command.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index cae68b21e95f..d2add9d964f5 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -976,15 +976,18 @@ command_Run(struct bundle *bundle, int argc, char const *const *argv,
}
}
-void
+int
command_Decode(struct bundle *bundle, char *buff, int nb, struct prompt *prompt,
const char *label)
{
int argc;
char *argv[MAXARGS];
- argc = command_Interpret(buff, nb, argv);
+ if ((argc = command_Interpret(buff, nb, argv)) < 0)
+ return 0;
+
command_Run(bundle, argc, (char const *const *)argv, prompt, label, NULL);
+ return 1;
}
static int