[Olsr-cvs] olsrd-current/src build_msg.c, 1.41, 1.42 duplicate_set.c, 1.21, 1.22 lq_packet.c, 1.34, 1.35 routing_table.c, 1.37, 1.38 tc_set.c, 1.39, 1.40

Bernd Petrovitsch (spam-protected)
Thu Nov 29 23:59:53 CET 2007


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

Modified Files:
	build_msg.c duplicate_set.c lq_packet.c routing_table.c 
	tc_set.c 
Log Message:
* fixed warnings

Index: duplicate_set.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/duplicate_set.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** duplicate_set.c	29 Nov 2007 18:10:11 -0000	1.21
--- duplicate_set.c	29 Nov 2007 22:59:50 -0000	1.22
***************
*** 64,68 ****
     * entries the timeoutfunction is only ran every 2 seconds
     */
!   olsr_register_scheduler_event_dijkstra(&olsr_time_out_duplicate_table, NULL, 2, 0, NULL);
    
    for(i = 0; i < HASHSIZE; i++)
--- 64,68 ----
     * entries the timeoutfunction is only ran every 2 seconds
     */
!   olsr_register_scheduler_event_dijkstra(&olsr_time_out_duplicate_table, NULL, 2.0, 0.0, NULL);
    
    for(i = 0; i < HASHSIZE; i++)

Index: lq_packet.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/lq_packet.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** lq_packet.c	29 Nov 2007 18:10:13 -0000	1.34
--- lq_packet.c	29 Nov 2007 22:59:50 -0000	1.35
***************
*** 580,584 ****
  
      hello->neighbors = NULL;
!     limit = ser + size;
      while (curr < limit) {
          const struct lq_hello_info_header *info_head = (const struct lq_hello_info_header *)curr;
--- 580,584 ----
  
      hello->neighbors = NULL;
!     limit = ((const unsigned char *)ser) + size;
      while (curr < limit) {
          const struct lq_hello_info_header *info_head = (const struct lq_hello_info_header *)curr;

Index: tc_set.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/tc_set.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** tc_set.c	29 Nov 2007 18:10:17 -0000	1.39
--- tc_set.c	29 Nov 2007 22:59:51 -0000	1.40
***************
*** 754,758 ****
     * if the edge exists in order to avoid address validation.
     */
!   limit = (void *)msg + size;
    while (curr < limit) {
      if (olsr_tc_update_edge(tc, vtime_s, ansn, type, &curr)) {
--- 754,758 ----
     * if the edge exists in order to avoid address validation.
     */
!   limit = (unsigned char *)msg + size;
    while (curr < limit) {
      if (olsr_tc_update_edge(tc, vtime_s, ansn, type, &curr)) {

Index: build_msg.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/build_msg.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** build_msg.c	29 Nov 2007 18:10:11 -0000	1.41
--- build_msg.c	29 Nov 2007 22:59:50 -0000	1.42
***************
*** 61,64 ****
--- 61,66 ----
  #define OLSR_HNA_IPV6_HDRSIZE      OLSR_IPV6_HDRSIZE
  
+ static void
+ check_buffspace(int msgsize, int buffsize, const char *type);
  
  /* All these functions share this buffer */
***************
*** 242,247 ****
    if(msgsize > buffsize)
      {
!       OLSR_PRINTF(1, "%s build, outputbuffer to small(%d/%d)!\n", type, msgsize, buffsize);
!       olsr_syslog(OLSR_LOG_ERR, "%s build, outputbuffer to small(%d/%d)!\n", type, msgsize, buffsize);
        olsr_exit(__func__, EXIT_FAILURE);
      }
--- 244,249 ----
    if(msgsize > buffsize)
      {
!       OLSR_PRINTF(1, "%s build, outputbuffer to small(%d/%u)!\n", type, msgsize, buffsize);
!       olsr_syslog(OLSR_LOG_ERR, "%s build, outputbuffer to small(%d/%u)!\n", type, msgsize, buffsize);
        olsr_exit(__func__, EXIT_FAILURE);
      }

Index: routing_table.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/routing_table.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** routing_table.c	29 Nov 2007 18:10:17 -0000	1.37
--- routing_table.c	29 Nov 2007 22:59:51 -0000	1.38
***************
*** 123,132 ****
  avl_comp_ipv6_prefix (const void *prefix1, const void *prefix2)
  {       
-   int res;
    const struct olsr_ip_prefix *pfx1 = prefix1;
    const struct olsr_ip_prefix *pfx2 = prefix2;
  
    /* prefix */
!   res = memcmp(&pfx1->prefix.v6, &pfx2->prefix.v6, 16);
    if (res != 0) {
      return res;
--- 123,131 ----
  avl_comp_ipv6_prefix (const void *prefix1, const void *prefix2)
  {       
    const struct olsr_ip_prefix *pfx1 = prefix1;
    const struct olsr_ip_prefix *pfx2 = prefix2;
  
    /* prefix */
!   int res = ip6cmp(&pfx1->prefix.v6, &pfx2->prefix.v6);
    if (res != 0) {
      return res;
***************
*** 353,357 ****
  
    /* walk all remaining originator entries */
!   while ((node = avl_walk_next(node))) {
      struct rt_path *rtp = node->data;
  
--- 352,356 ----
  
    /* walk all remaining originator entries */
!   while ((node = avl_walk_next(node)) != NULL) {
      struct rt_path *rtp = node->data;
  





More information about the Olsr-cvs mailing list