From dd0645c5b76252f6c673406039f384ba2cdeea74 Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Fri, 15 May 1998 23:58:30 +0000 Subject: o Add the `set mode' command for change a links current mode. It is not possible to switch to or from dedicated or direct mode, but all other combinations are ok (eg. -auto -> -ddial). o Cope with the fact that commands with optional context may not be able to obtain a link with command_ChooseLink() (if all links have been deleted for example). o Allow `clone'ing in non-multilink mode. We may for example want to configure two links in unilink mode and dial them both, using the one that comes up first. It's also possible to rename ``deflink'' by cloning it, deleting the original, then setting the mode of the new link. --- usr.sbin/ppp/lcp.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'usr.sbin/ppp/lcp.c') diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c index 91cde27fda3c..4da2d555eb6e 100644 --- a/usr.sbin/ppp/lcp.c +++ b/usr.sbin/ppp/lcp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: lcp.c,v 1.55.2.52 1998/05/01 19:24:55 brian Exp $ + * $Id: lcp.c,v 1.55.2.53 1998/05/06 23:49:45 brian Exp $ * * TODO: * o Limit data field length by MRU @@ -132,8 +132,12 @@ static const char *cftypes[] = { int lcp_ReportStatus(struct cmdargs const *arg) { - struct link *l = command_ChooseLink(arg); - struct lcp *lcp = &l->lcp; + struct link *l; + struct lcp *lcp; + + if (!(l = command_ChooseLink(arg))) + return -1; + lcp = &l->lcp; prompt_Printf(arg->prompt, "%s: %s [%s]\n", l->name, lcp->fsm.name, State2Nam(lcp->fsm.state)); -- cgit v1.2.3