}
}
+ /* Check Link quality dijkstra limit */
+ if (olsr_cnf->lq_dinter < cnf->pollrate && olsr_cnf->lq_dlimit != 255) {
+ fprintf(stderr, "Link quality dijkstra limit must be higher than pollrate\n");
+ return -1;
+ }
+
/* Pollrate */
if(cnf->pollrate < MIN_POLLRATE ||
}
void
-olsr_calculate_routing_table (void *context __attribute__((unused)))
+olsr_calculate_routing_table (void)
{
#ifdef SPF_PROFILING
struct timeval t1, t2, t3, t4, t5, spf_init, spf_run, route, kernel, total;
/* calculate the routing table */
if (changes_neighborhood || changes_topology || changes_hna) {
- olsr_calculate_routing_table(NULL);
+ olsr_calculate_routing_table();
}
if (olsr_cnf->debug_level > 0)
changes_force = OLSR_FALSE;
}
+/*
+ * Callback for the periodic route calculation.
+ */
+void
+olsr_trigger_forced_update(void *unused __attribute__((unused))) {
+ changes_force = OLSR_TRUE;
-
+ changes_neighborhood = OLSR_TRUE;
+ changes_topology = OLSR_TRUE;
+ changes_hna = OLSR_TRUE;
+
+ olsr_process_changes();
+}
/**
*Initialize all the tables used(neighbor,
/* Start periodic SPF and RIB recalculation */
if (olsr_cnf->lq_dinter > 0.0) {
olsr_start_timer((unsigned int)(olsr_cnf->lq_dinter * MSEC_PER_SEC), 5,
- OLSR_TIMER_PERIODIC, &olsr_calculate_routing_table, NULL, 0);
+ OLSR_TIMER_PERIODIC, &olsr_trigger_forced_update, NULL, 0);
}
}
int
olsr_printf(int, const char *, ...) __attribute__((format(printf,2,3)));
+void
+olsr_trigger_forced_update(void *);
+
#endif