[pisa-src] r1144 - in trunk: pisacd/cdmain.c pisasd/sdmain.c

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Wed, 14 Oct 2009 16:00:02 +0200

Author: tjansen
Date: Wed Oct 14 16:00:02 2009
New Revision: 1144

Log:
Removed the dummy maintenance function from pisacd and added a bit of
documentation to the init routines regarding the scheduler.

Modified:
   trunk/pisacd/cdmain.c
   trunk/pisasd/sdmain.c

Modified: trunk/pisacd/cdmain.c
==============================================================================
--- trunk/pisacd/cdmain.c       Wed Oct 14 15:49:36 2009        (r1143)
+++ trunk/pisacd/cdmain.c       Wed Oct 14 16:00:02 2009        (r1144)
@@ -147,13 +147,6 @@
        pisa_pending_remove_by_entry(entry);
 }
 
-static void pisa_maintenance_test(void *data)
-{
-       struct timeval delay = {3, 0};
-       PISA_DEBUG(PL_GENERIC, "maintenance, next in 3 seconds.\n");
-       pisa_sched_add(pisa_maintenance_test, &delay, NULL);
-}
-
 /**
  * Initialize the basic settings before starting the main loop.
  */
@@ -273,8 +266,8 @@
 
        pisa_tunnel_configure_main(cd_ctx.ifname_tunnel, &cd_cfg.local_ipv4, 
&cd_cfg.local_netmask, MTU_TUN);
 
+       /* Initialize the scheduler and start some maintenance tasks */
        pisa_sched_init(&cd_ctx.scheduler);
-       pisa_sched_add_now(pisa_maintenance_test, NULL);
        pisa_sched_add_now(pisa_task_heartbeat, NULL);
        pisa_sched_add_now(pisa_task_pending, NULL);
 }

Modified: trunk/pisasd/sdmain.c
==============================================================================
--- trunk/pisasd/sdmain.c       Wed Oct 14 15:49:36 2009        (r1143)
+++ trunk/pisasd/sdmain.c       Wed Oct 14 16:00:02 2009        (r1144)
@@ -239,6 +239,7 @@
        sd_ctx.tunnel = pisa_tunnel_open_tundev(sd_ctx.fd_pisa_tunnel_name, 
IFNAMSIZ);
        pisa_tunnel_configure_main(sd_ctx.fd_pisa_tunnel_name, &sd_cfg.ipaddr, 
&netmask, MTU_TUN);
 
+       /* Initialize the scheduler */
        pisa_sched_init(&sd_ctx.scheduler);
 }
 

Other related posts:

  • » [pisa-src] r1144 - in trunk: pisacd/cdmain.c pisasd/sdmain.c - Thomas Jansen