diff options
author | 2002-03-04 10:17:40 +0000 | |
---|---|---|
committer | 2002-03-04 10:17:40 +0000 | |
commit | 37c17bd560eef46ecb727aa97dbc7330b73bd8cc (patch) | |
tree | f0a18b34bce04a580a5a982e8e67fa135a12efb1 | |
parent | Typos; Matt <matt@vertrauen.org> (diff) | |
download | wireguard-openbsd-37c17bd560eef46ecb727aa97dbc7330b73bd8cc.tar.xz wireguard-openbsd-37c17bd560eef46ecb727aa97dbc7330b73bd8cc.zip |
Don't blow away ``set escape'' settings when we've completed the
login phase. Just initialise the correct parts
-rw-r--r-- | usr.sbin/ppp/ppp/async.c | 10 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp/async.h | 3 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp/datalink.c | 4 |
3 files changed, 12 insertions, 5 deletions
diff --git a/usr.sbin/ppp/ppp/async.c b/usr.sbin/ppp/ppp/async.c index ed59fc16bbf..1d6f2cd1ec8 100644 --- a/usr.sbin/ppp/ppp/async.c +++ b/usr.sbin/ppp/ppp/async.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: async.c,v 1.9 2001/06/13 21:33:40 brian Exp $ + * $OpenBSD: async.c,v 1.10 2002/03/04 10:17:40 brian Exp $ */ #include <sys/types.h> @@ -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/ppp/async.h b/usr.sbin/ppp/ppp/async.h index 9f5c4d01b5d..752d3cee1bb 100644 --- a/usr.sbin/ppp/ppp/async.h +++ b/usr.sbin/ppp/ppp/async.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: async.h,v 1.4 2000/02/27 01:38:24 brian Exp $ + * $OpenBSD: async.h,v 1.5 2002/03/04 10:17:40 brian Exp $ */ #define HDLCSIZE (MAX_MRU*2+6) @@ -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/ppp/datalink.c b/usr.sbin/ppp/ppp/datalink.c index b7c4a6a9928..a2763236c28 100644 --- a/usr.sbin/ppp/ppp/datalink.c +++ b/usr.sbin/ppp/ppp/datalink.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: datalink.c,v 1.38 2001/10/24 10:01:12 brian Exp $ + * $OpenBSD: datalink.c,v 1.39 2002/03/04 10:17:40 brian Exp $ */ #include <sys/param.h> @@ -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); |