[pisa-src] r1380 - trunk/pisasd/sdmain.c

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Wed, 28 Oct 2009 14:28:03 +0100

Author: tjansen
Date: Wed Oct 28 14:28:03 2009
New Revision: 1380

Log:
Fixed a comment in the shutdown procedure. Reordered the pisa_sched_cleanup
call to group it with the rest of the close calls for the other file
descriptors.

Modified:
   trunk/pisasd/sdmain.c

Modified: trunk/pisasd/sdmain.c
==============================================================================
--- trunk/pisasd/sdmain.c       Wed Oct 28 14:23:35 2009        (r1379)
+++ trunk/pisasd/sdmain.c       Wed Oct 28 14:28:03 2009        (r1380)
@@ -472,13 +472,14 @@
        sdctx_destroy(&sd_ctx);
        sdconf_destroy(&sd_cfg);
        pisa_arp_cleanup();
-       pisa_sched_cleanup(&sd_ctx.scheduler);
 
-       /* finish all the remaining jobs */
+       /* Close file descriptors. pisa_sched_cleanup takes care of the
+        * scheduler pipe. */
        close(sd_ctx.tunc);
        close(sd_ctx.tund);
        close(sd_ctx.tunnel);
        close(sd_ctx.fd_pisaconf);
+       pisa_sched_cleanup(&sd_ctx.scheduler);
 
        /* Disable IPv4 forwarding */
        pisa_forwarding_stop();

Other related posts:

  • » [pisa-src] r1380 - trunk/pisasd/sdmain.c - Thomas Jansen