[Olsr-cvs] olsrd-current/lib/nameservice/src nameservice.c, 1.30, 1.31
Bernd Petrovitsch
(spam-protected)
Tue Sep 18 00:24:24 CEST 2007
- Previous message: [Olsr-cvs] olsrd-current/lib/quagga/src olsrd_plugin.c,1.5,1.6
- Next message: [Olsr-cvs] olsrd-current/src duplicate_set.c, 1.15, 1.16 hna_set.c, 1.21, 1.22 link_set.c, 1.72, 1.73 main.c, 1.99, 1.100 mid_set.c, 1.21, 1.22 mpr_selector_set.c, 1.17, 1.18 neighbor_table.c, 1.33, 1.34 scheduler.c, 1.42, 1.43 scheduler.h, 1.13, 1.14 tc_set.c, 1.29, 1.30
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/olsrd/olsrd-current/lib/nameservice/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22219/lib/nameservice/src
Modified Files:
nameservice.c
Log Message:
* applied 114-olsrd-timeoutlimit.patch
Index: nameservice.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/nameservice/src/nameservice.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** nameservice.c 17 Sep 2007 21:57:05 -0000 1.30
--- nameservice.c 17 Sep 2007 22:24:22 -0000 1.31
***************
*** 380,384 ****
/* register functions with olsrd */
olsr_parser_add_function(&olsr_parser, PARSER_TYPE, 1);
! olsr_register_timeout_function(&olsr_timeout);
olsr_register_scheduler_event(&olsr_event, NULL, my_interval, 0, NULL);
--- 380,384 ----
/* register functions with olsrd */
olsr_parser_add_function(&olsr_parser, PARSER_TYPE, 1);
! olsr_register_timeout_function(&olsr_timeout, OLSR_TRUE);
olsr_register_scheduler_event(&olsr_event, NULL, my_interval, 0, NULL);
***************
*** 482,497 ****
* and write changes to file
*/
void
olsr_timeout(void)
{
! timeout_old_names(list, &name_table_changed);
! timeout_old_names(forwarder_list, &forwarder_table_changed);
! timeout_old_names(service_list, &service_table_changed);
! timeout_old_names(latlon_list, &latlon_table_changed);
!
! write_resolv_file();
! write_hosts_file();
! write_services_file();
! write_latlon_file();
}
--- 482,514 ----
* and write changes to file
*/
+
+ static int timeout_roundrobin = 0;
+
void
olsr_timeout(void)
{
! switch(timeout_roundrobin++)
! {
! case 0:
! timeout_old_names(list, &name_table_changed);
! timeout_old_names(forwarder_list, &forwarder_table_changed);
! timeout_old_names(service_list, &service_table_changed);
! timeout_old_names(latlon_list, &latlon_table_changed);
! break;
! case 1:
! write_resolv_file(); // if forwarder_table_changed
! break;
! case 2:
! write_hosts_file(); // if name_table_changed
! break;
! case 3:
! write_services_file(); // if service_table_changed
! break;
! case 4:
! write_latlon_file(); // latlon_table_changed
! break;
! default:
! timeout_roundrobin = 0;
! } // switch
}
- Previous message: [Olsr-cvs] olsrd-current/lib/quagga/src olsrd_plugin.c,1.5,1.6
- Next message: [Olsr-cvs] olsrd-current/src duplicate_set.c, 1.15, 1.16 hna_set.c, 1.21, 1.22 link_set.c, 1.72, 1.73 main.c, 1.99, 1.100 mid_set.c, 1.21, 1.22 mpr_selector_set.c, 1.17, 1.18 neighbor_table.c, 1.33, 1.34 scheduler.c, 1.42, 1.43 scheduler.h, 1.13, 1.14 tc_set.c, 1.29, 1.30
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Olsr-cvs
mailing list