aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/ccp.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1998-05-15 23:58:30 +0000
committerBrian Somers <brian@FreeBSD.org>1998-05-15 23:58:30 +0000
commitdd0645c5b76252f6c673406039f384ba2cdeea74 (patch)
tree684801d060a212758ea54068162a61bfd1d7c05b /usr.sbin/ppp/ccp.c
parentea7229694b5a94840ef14aa0bb71bb338f02bbe9 (diff)
downloadsrc-dd0645c5b76252f6c673406039f384ba2cdeea74.tar.gz
src-dd0645c5b76252f6c673406039f384ba2cdeea74.zip
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.
Notes
Notes: svn path=/cvs2svn/branches/MP/; revision=36088
Diffstat (limited to 'usr.sbin/ppp/ccp.c')
-rw-r--r--usr.sbin/ppp/ccp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c
index 9abdf826bf02..8c3d23838373 100644
--- a/usr.sbin/ppp/ccp.c
+++ b/usr.sbin/ppp/ccp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: ccp.c,v 1.30.2.42 1998/05/01 19:23:57 brian Exp $
+ * $Id: ccp.c,v 1.30.2.43 1998/05/15 18:20:55 brian Exp $
*
* TODO:
* o Support other compression protocols
@@ -132,8 +132,12 @@ static const struct ccp_algorithm *algorithm[] = {
int
ccp_ReportStatus(struct cmdargs const *arg)
{
- struct link *l = command_ChooseLink(arg);
- struct ccp *ccp = &l->ccp;
+ struct link *l;
+ struct ccp *ccp;
+
+ if (!(l = command_ChooseLink(arg)))
+ return -1;
+ ccp = &l->ccp;
prompt_Printf(arg->prompt, "%s: %s [%s]\n", l->name, ccp->fsm.name,
State2Nam(ccp->fsm.state));