txtinfo vtime┬┤layout change, and remove mid receive jitter to get typically same...
authorMarkus Kittenberger <Markus.Kittenberger@gmx.at>
Thu, 17 Dec 2009 19:51:31 +0000 (20:51 +0100)
committerMarkus Kittenberger <Markus.Kittenberger@gmx.at>
Thu, 17 Dec 2009 19:51:31 +0000 (20:51 +0100)
lib/txtinfo/src/olsrd_txtinfo.c
src/mid_set.c

index 6015238..d1b81dc 100644 (file)
@@ -506,14 +506,10 @@ ipc_print_mid(struct autobuf *abuf)
     entry = mid_set[idx].next;
 
     while (entry != &mid_set[idx]) {
-      struct ipaddr_str buf;
 #ifdef ACTIVATE_VTIME_TXTINFO
-      uint32_t vt = entry->mid_timer != NULL ? (entry->mid_timer->timer_clock - now_times) : 0;
-      int diff = (int)(vt);
-      abuf_appendf(abuf, "%s\t\t%d.%03d\n",
-                     olsr_ip_to_string(&buf, &entry->main_addr),
-                     diff/1000, abs(diff%1000));
+      struct ipaddr_str buf, buf2;
 #else
+      struct ipaddr_str buf;
       abuf_puts(abuf, olsr_ip_to_string(&buf, &entry->main_addr));
 #endif /*vtime txtinfo*/
       alias = entry->aliases;
@@ -521,7 +517,6 @@ ipc_print_mid(struct autobuf *abuf)
 
       while (alias) {
 #ifdef ACTIVATE_VTIME_TXTINFO
-        struct ipaddr_str buf2;
         uint32_t vt = alias->vtime - now_times;
         int diff = (int)(vt);
 
index eee53b0..0ea040f 100644 (file)
@@ -123,7 +123,7 @@ olsr_set_mid_timer(struct mid_entry *mid, olsr_reltime rel_timer)
   if (mid->mid_timer != NULL) willFireIn = olsr_getTimeDue(mid->mid_timer->timer_clock);
   
   if (willFireIn < 0 || (olsr_reltime)willFireIn < rel_timer) {
-    olsr_set_timer(&mid->mid_timer, rel_timer, OLSR_MID_JITTER, OLSR_TIMER_ONESHOT, &olsr_expire_mid_entry, mid, 0);
+    olsr_set_timer(&mid->mid_timer, rel_timer, 0, OLSR_TIMER_ONESHOT, &olsr_expire_mid_entry, mid, 0);
   }
 }