]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/main.c
Allow *-max-terminate to be set to zero -- meaning that one Terminate-
[ppp.git] / pppd / main.c
index 4171accd7204b1dc1c64c2f12829d7042857c1c5..6e50947000ed65e620bb12089582ef306bf54fc0 100644 (file)
@@ -40,7 +40,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID  "$Id: main.c,v 1.129 2003/09/23 15:11:58 kad Exp $"
+#define RCSID  "$Id: main.c,v 1.132 2004/02/02 02:52:51 carlsonj Exp $"
 
 #include <stdio.h>
 #include <ctype.h>
@@ -589,7 +589,8 @@ main(argc, argv)
         */
     disconnect:
        new_phase(PHASE_DISCONNECT);
-       the_channel->disconnect();
+       if (the_channel->disconnect)
+           the_channel->disconnect();
 
     fail:
        if (the_channel->cleanup)
@@ -1172,6 +1173,7 @@ print_link_stats()
        info("Connect time %d.%d minutes.", t/10, t%10);
        info("Sent %u bytes, received %u bytes.",
            link_stats.bytes_out, link_stats.bytes_in);
+       link_stats_valid = 0;
     }
 }
 
@@ -1337,8 +1339,8 @@ kill_my_pg(sig)
 
     act.sa_handler = SIG_IGN;
     act.sa_flags = 0;
-    kill(0, sig);
     sigaction(sig, &act, &oldact);
+    kill(0, sig);
     sigaction(sig, &oldact, NULL);
 }