aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2002-03-04 10:08:57 +0000
committerBrian Somers <brian@FreeBSD.org>2002-03-04 10:08:57 +0000
commitea59de37336bda3c726b96819b4ae2541821ba93 (patch)
treec30e451aefcf8467bb77753419c539736de5a4f9
parent2291a8f3be9ba02529ba6f459a83c3d8d48e83ad (diff)
downloadsrc-ea59de37336bda3c726b96819b4ae2541821ba93.tar.gz
src-ea59de37336bda3c726b96819b4ae2541821ba93.zip
Notes
-rw-r--r--usr.sbin/ppp/async.c8
-rw-r--r--usr.sbin/ppp/async.h1
-rw-r--r--usr.sbin/ppp/datalink.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/ppp/async.c b/usr.sbin/ppp/async.c
index 4653821d9af3..266c906d0c96 100644
--- a/usr.sbin/ppp/async.c
+++ b/usr.sbin/ppp/async.c
@@ -56,10 +56,16 @@
void
async_Init(struct async *async)
{
+ async_Setup(async);
+ memset(async->cfg.EscMap, '\0', sizeof async->cfg.EscMap);
+}
+
+void
+async_Setup(struct async *async)
+{
async->mode = MODE_HUNT;
async->length = 0;
async->my_accmap = async->his_accmap = 0xffffffff;
- memset(async->cfg.EscMap, '\0', sizeof async->cfg.EscMap);
}
void
diff --git a/usr.sbin/ppp/async.h b/usr.sbin/ppp/async.h
index 33c68a5953f1..dd1eea31edae 100644
--- a/usr.sbin/ppp/async.h
+++ b/usr.sbin/ppp/async.h
@@ -47,6 +47,7 @@ struct physical;
struct bundle;
extern void async_Init(struct async *);
+extern void async_Setup(struct async *);
extern void async_SetLinkParams(struct async *, struct lcp *);
extern struct layer asynclayer;
diff --git a/usr.sbin/ppp/datalink.c b/usr.sbin/ppp/datalink.c
index 1bbf3cc9cb70..135160bf8fd7 100644
--- a/usr.sbin/ppp/datalink.c
+++ b/usr.sbin/ppp/datalink.c
@@ -234,7 +234,7 @@ datalink_LoginDone(struct datalink *dl)
dl->dial.incs = 0;
hdlc_Init(&dl->physical->hdlc, &dl->physical->link.lcp);
- async_Init(&dl->physical->async);
+ async_Setup(&dl->physical->async);
lcp_Setup(&dl->physical->link.lcp, dl->state == DATALINK_READY ?
0 : dl->physical->link.lcp.cfg.openmode);