]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/lcp.c
mods to get it to compile better on linux
[ppp.git] / pppd / lcp.c
index 6d896a4ab1f3ab3208a9cd1f08eefe39489bab25..48c1b5168b64f687d5e06cc5315b47485b4147ad 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: lcp.c,v 1.28 1996/10/08 04:35:02 paulus Exp $";
+static char rcsid[] = "$Id: lcp.c,v 1.30 1997/04/30 05:52:59 paulus Exp $";
 #endif
 
 /*
@@ -78,10 +78,11 @@ static void lcp_rprotrej __P((fsm *, u_char *, int));
 
 static void lcp_echo_lowerup __P((int));
 static void lcp_echo_lowerdown __P((int));
-static void LcpEchoTimeout __P((caddr_t));
+static void LcpEchoTimeout __P((void *));
 static void lcp_received_echo_reply __P((fsm *, int, u_char *, int));
 static void LcpSendEchoRequest __P((fsm *));
 static void LcpLinkFailure __P((fsm *));
+static void LcpEchoCheck __P((fsm *));
 
 static fsm_callbacks lcp_callbacks = { /* LCP callback routines */
     lcp_resetci,               /* Reset our Configuration Information */
@@ -232,7 +233,8 @@ lcp_close(unit, reason)
 {
     fsm *f = &lcp_fsm[unit];
 
-    phase = PHASE_TERMINATE;
+    if (phase != PHASE_DEAD)
+       phase = PHASE_TERMINATE;
     if (f->state == STOPPED && f->flags & (OPT_PASSIVE|OPT_SILENT)) {
        /*
         * This action is not strictly according to the FSM in RFC1548,
@@ -915,7 +917,7 @@ lcp_nakci(f, p, len)
 
        switch (citype) {
        case CI_MRU:
-           if (go->neg_mru && go->mru != DEFMRU
+           if ((go->neg_mru && go->mru != DEFMRU)
                || no.neg_mru || cilen != CILEN_SHORT)
                goto bad;
            GETSHORT(cishort, p);
@@ -923,7 +925,7 @@ lcp_nakci(f, p, len)
                try.mru = cishort;
            break;
        case CI_ASYNCMAP:
-           if (go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF
+           if ((go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF)
                || no.neg_asyncmap || cilen != CILEN_LONG)
                goto bad;
            break;
@@ -1565,7 +1567,6 @@ lcp_printpkt(p, plen, printer, arg)
     u_char *pstart, *optend;
     u_short cishort;
     u_int32_t cilong;
-    int fascii;
 
     if (plen < HEADERLEN)
        return 0;
@@ -1746,7 +1747,7 @@ LcpEchoCheck (f)
      * Start the timer for the next interval.
      */
     assert (lcp_echo_timer_running==0);
-    TIMEOUT (LcpEchoTimeout, (caddr_t) f, lcp_echo_interval);
+    TIMEOUT (LcpEchoTimeout, f, lcp_echo_interval);
     lcp_echo_timer_running = 1;
 }
 
@@ -1756,7 +1757,7 @@ LcpEchoCheck (f)
 
 static void
 LcpEchoTimeout (arg)
-    caddr_t arg;
+    void *arg;
 {
     if (lcp_echo_timer_running != 0) {
         lcp_echo_timer_running = 0;
@@ -1854,7 +1855,7 @@ lcp_echo_lowerdown (unit)
     fsm *f = &lcp_fsm[unit];
 
     if (lcp_echo_timer_running != 0) {
-        UNTIMEOUT (LcpEchoTimeout, (caddr_t) f);
+        UNTIMEOUT (LcpEchoTimeout, f);
         lcp_echo_timer_running = 0;
     }
 }