[Olsr-cvs] olsrd-current/lib/nameservice/src nameservice.c, 1.28, 1.29

Bernd Petrovitsch (spam-protected)
Thu Sep 13 17:32:01 CEST 2007


Update of /cvsroot/olsrd/olsrd-current/lib/nameservice/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16823/lib/nameservice/src

Modified Files:
	nameservice.c 
Log Message:
* patch by Hannes Gredler <(spam-protected)> to consolidate the the link-state database and the spf-calculation

Index: nameservice.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/nameservice/src/nameservice.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** nameservice.c	5 Sep 2007 16:11:10 -0000	1.28
--- nameservice.c	13 Sep 2007 15:31:59 -0000	1.29
***************
*** 1441,1444 ****
--- 1441,1446 ----
  	struct olsr_if *ifs;
  	union olsr_ip_addr ip;
+     struct tc_entry *tc;
+     struct tc_edge_entry *tc_edge;
  
  	if (!latlon_table_changed) return;
***************
*** 1512,1536 ****
  		}
  	}
! 	for (hash = 0; hash < HASHSIZE; hash++) 
! 	{
! 		struct tc_entry *entry = tc_table[hash].next;
! 		while(entry != &tc_table[hash])
! 		{
! 			struct topo_dst *dst_entry = entry->destinations.next;
! 			while(dst_entry != &entry->destinations)
! 			{
! 				fprintf(js, "Link('%s','%s',%f,%f,%f);\n", 
! 					olsr_ip_to_string(&dst_entry->T_dest_addr),
! 					olsr_ip_to_string(&entry->T_last_addr), 
! 					dst_entry->link_quality,
! 					dst_entry->inverse_link_quality,
! 					(dst_entry->link_quality * dst_entry->inverse_link_quality) ?
! 						1.0 / (dst_entry->link_quality * dst_entry->inverse_link_quality) :
! 						0.0);
! 				dst_entry = dst_entry->next;
! 			}
! 			entry = entry->next;
! 		}
! 	}
  
  	fclose(js);
--- 1514,1532 ----
  		}
  	}
! 
!     OLSR_FOR_ALL_TC_ENTRIES(tc) {
!         OLSR_FOR_ALL_TC_EDGE_ENTRIES(tc, tc_edge) {
! 
!             fprintf(js, "Link('%s','%s',%f,%f,%f);\n", 
! 					olsr_ip_to_string(&tc_edge->T_dest_addr),
! 					olsr_ip_to_string(&tc->addr), 
! 					tc_edge->link_quality,
! 					tc_edge->inverse_link_quality,
! 					(tc_edge->link_quality * tc_edge->inverse_link_quality) ?
!                     1.0 / (tc_edge->link_quality * tc_edge->inverse_link_quality) :
!                     0.0);
! 
!         } OLSR_FOR_ALL_TC_EDGE_ENTRIES_END(tc, tc_edge);
!     } OLSR_FOR_ALL_TC_ENTRIES_END(tc);
  
  	fclose(js);





More information about the Olsr-cvs mailing list