]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/fsm.c
add defns for debug stuff
[ppp.git] / pppd / fsm.c
index a11922a31df12448e8b3729614ca155c9b257f8a..5d2eca6880ad53af0544d978960b2cf88014cfd5 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: fsm.c,v 1.5 1994/09/21 06:47:37 paulus Exp $";
+static char rcsid[] = "$Id: fsm.c,v 1.8 1994/11/10 01:52:05 paulus Exp $";
 #endif
 
 /*
@@ -28,6 +28,7 @@ static char rcsid[] = "$Id: fsm.c,v 1.5 1994/09/21 06:47:37 paulus Exp $";
  */
 
 #include <stdio.h>
+#include <string.h>
 #include <sys/types.h>
 #include <syslog.h>
 
@@ -47,7 +48,7 @@ static void fsm_sconfreq __P((fsm *, int));
 
 #define PROTO_NAME(f)  ((f)->callbacks->proto_name)
 
-int peer_mru[N_PPP];
+int peer_mru[NUM_PPP];
 
 
 /*
@@ -469,6 +470,7 @@ fsm_rconfack(f, id, inp, len)
 
     case ACKRCVD:
        /* Huh? an extra valid Ack? oh well... */
+       UNTIMEOUT(fsm_timeout, (caddr_t) f);    /* Cancel timeout */
        fsm_sconfreq(f, 0);
        f->state = REQSENT;
        break;
@@ -533,6 +535,7 @@ fsm_rconfnakrej(f, code, id, inp, len)
 
     case ACKRCVD:
        /* Got a Nak/reject when we had already had an Ack?? oh well... */
+       UNTIMEOUT(fsm_timeout, (caddr_t) f);    /* Cancel timeout */
        fsm_sconfreq(f, 0);
        f->state = REQSENT;
        break;
@@ -590,11 +593,13 @@ fsm_rtermack(f)
 
     switch (f->state) {
     case CLOSING:
+       UNTIMEOUT(fsm_timeout, (caddr_t) f);
        f->state = CLOSED;
        if( f->callbacks->finished )
            (*f->callbacks->finished)(f);
        break;
     case STOPPING:
+       UNTIMEOUT(fsm_timeout, (caddr_t) f);
        f->state = STOPPED;
        if( f->callbacks->finished )
            (*f->callbacks->finished)(f);