Another bunch of fixes for the timer refactoring (damn it)
authorHenning Rogge <hrogge@googlemail.com>
Sat, 8 Aug 2009 15:39:13 +0000 (17:39 +0200)
committerHenning Rogge <hrogge@googlemail.com>
Sat, 8 Aug 2009 15:39:13 +0000 (17:39 +0200)
src/interfaces.c
src/interfaces.h
src/lq_packet.c
src/unix/ifnet.c
src/win32/ifnet.c

index a3cf37f..bf85125 100644 (file)
@@ -277,7 +277,7 @@ remove_interface(struct interface **pinterf)
   /*
    * remember the IP for some time
    */
-  add_lost_interface_ip(&ifp->ip_addr, me_to_reltime(ifp->hello_valtime));
+  add_lost_interface_ip(&ifp->ip_addr, ifp->hello_validity);
 
   /*
    * Unlink from config.
index 075d4cc..d2ba117 100644 (file)
@@ -165,8 +165,8 @@ struct interface {
   } nic_state;
 #endif
 
-  uint32_t hello_etime;
-  uint8_t hello_valtime;
+  uint32_t hello_interval;
+  uint32_t hello_validity;
 #if 0
   struct if_gen_property *gen_properties;       /* Generic interface properties */
 #endif
index 05c6a2a..37ee8a2 100644 (file)
@@ -78,7 +78,7 @@ create_lq_hello(struct lq_hello_message *lq_hello, struct interface *outif)
   // initialize the static fields
 
   lq_hello->comm.type = olsr_get_Hello_MessageId();
-  lq_hello->comm.vtime = reltime_to_me(outif->hello_valtime);
+  lq_hello->comm.vtime = outif->hello_validity;
   lq_hello->comm.size = 0;
 
   lq_hello->comm.orig = olsr_cnf->router_id;
@@ -86,7 +86,7 @@ create_lq_hello(struct lq_hello_message *lq_hello, struct interface *outif)
   lq_hello->comm.ttl = 1;
   lq_hello->comm.hops = 0;
 
-  lq_hello->htime = outif->hello_etime;
+  lq_hello->htime = outif->hello_interval;
   lq_hello->will = olsr_cnf->willingness;
 
   lq_hello->neigh = NULL;
@@ -164,7 +164,7 @@ create_lq_tc(struct lq_tc_message *lq_tc, struct interface *outif)
   // initialize the static fields
 
   lq_tc->comm.type = olsr_get_TC_MessageId();
-  lq_tc->comm.vtime = reltime_to_me(olsr_cnf->tc_params.validity_time);
+  lq_tc->comm.vtime = olsr_cnf->tc_params.validity_time;
   lq_tc->comm.size = 0;
 
   lq_tc->comm.orig = olsr_cnf->router_id;
index c1c5000..633a788 100644 (file)
@@ -602,8 +602,8 @@ chk_if_up(struct olsr_if_config *iface)
     olsr_start_timer(olsr_cnf->hna_params.emission_interval,
                      HNA_JITTER, OLSR_TIMER_PERIODIC, &generate_hna, ifp, hna_gen_timer_cookie);
 
-  ifp->hello_etime = iface->cnf->hello_params.emission_interval;
-  ifp->hello_valtime = reltime_to_me(iface->cnf->hello_params.validity_time);
+  ifp->hello_interval = iface->cnf->hello_params.emission_interval;
+  ifp->hello_validity = iface->cnf->hello_params.validity_time;
 
   ifp->mode = iface->cnf->mode;
 
index 152b8d1..3c82f76 100644 (file)
@@ -750,8 +750,8 @@ chk_if_up(struct olsr_if_config *IntConf)
     olsr_start_timer(olsr_cnf->hna_params.emission_interval,
                      HNA_JITTER, OLSR_TIMER_PERIODIC, &generate_hna, New, hna_gen_timer_cookie->ci_id);
 
-  New->hello_etime = (uint32_t) (IntConf->cnf->hello_params.emission_interval);
-  New->hello_valtime = reltime_to_me(IntConf->cnf->hello_params.validity_time);
+  New->hello_interval = (uint32_t) (IntConf->cnf->hello_params.emission_interval);
+  New->hello_validity = reltime_to_me(IntConf->cnf->hello_params.validity_time);
 
   New->mode = IntConf->cnf->mode;