[Olsr-cvs] olsrd-current/src ipcalc.c, 1.2, 1.3 lq_route.c, 1.64, 1.65 routing_table.c, 1.40, 1.41

Bernd Petrovitsch (spam-protected)
Thu Dec 13 12:34:38 CET 2007


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

Modified Files:
	ipcalc.c lq_route.c routing_table.c 
Log Message:
- add #ifdef DEBUG for 2 OLSR_PRINTF() as suggested by (spam-protected)
- fixed compile regressions


Index: lq_route.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/lq_route.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** lq_route.c	12 Dec 2007 23:38:52 -0000	1.64
--- lq_route.c	13 Dec 2007 11:34:35 -0000	1.65
***************
*** 312,319 ****
  olsr_calculate_routing_table (void)
  {
- #if !defined(NODEBUG) && defined(DEBUG)
-   struct ipaddr_str buf;
- #endif
- 
    struct avl_tree cand_tree;
    struct avl_node *rtp_tree_node;
--- 312,315 ----
***************
*** 437,441 ****
  
      if (!link) {
! 
        /*
         * Supress the error msg when our own tc_entry
--- 433,437 ----
  
      if (!link) {
! #ifdef DEBUG
        /*
         * Supress the error msg when our own tc_entry
***************
*** 443,451 ****
         */
        if (tc != tc_myself) {
! #if !defined(NODEBUG)
          struct ipaddr_str buf;
  #endif
          OLSR_PRINTF(1, "SPF: %s no next-hop\n", olsr_ip_to_string(&buf, &tc->addr));
        }
        continue;
      }
--- 439,448 ----
         */
        if (tc != tc_myself) {
! #ifndef NODEBUG
          struct ipaddr_str buf;
  #endif
          OLSR_PRINTF(1, "SPF: %s no next-hop\n", olsr_ip_to_string(&buf, &tc->addr));
        }
+ #endif
        continue;
      }

Index: ipcalc.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/ipcalc.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ipcalc.c	2 Dec 2007 19:00:27 -0000	1.2
--- ipcalc.c	13 Dec 2007 11:34:35 -0000	1.3
***************
*** 64,68 ****
  
  #ifdef DEBUG
!   OLSR_PRINTF(3, "Prefix %d = Netmask: %s\n", prefix, olsr_ip_to_string(&buf, adr));
  #endif
    return 1;
--- 64,68 ----
  
  #ifdef DEBUG
!   OLSR_PRINTF(3, "Prefix %d = Netmask: %s\n", prefixlen, inet_ntop(olsr_cnf->ip_version, a, buf.buf, sizeof(buf.buf)));
  #endif
    return 1;

Index: routing_table.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/routing_table.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** routing_table.c	12 Dec 2007 22:04:08 -0000	1.40
--- routing_table.c	13 Dec 2007 11:34:35 -0000	1.41
***************
*** 489,493 ****
                            union olsr_ip_addr *originator, int origin)
  {
! #if !defined(NODEBUG)
    struct ipaddr_str dstbuf, origbuf;
  #endif
--- 489,493 ----
                            union olsr_ip_addr *originator, int origin)
  {
! #if !defined(NODEBUG) && defined(DEBUG)
    struct ipaddr_str dstbuf, origbuf;
  #endif
***************
*** 504,510 ****
--- 504,512 ----
    }
  
+ #ifdef DEBUG
    OLSR_PRINTF(1, "RIB: add prefix %s/%u from %s\n",
                olsr_ip_to_string(&dstbuf, dst), plen,
                olsr_ip_to_string(&origbuf, originator));
+ #endif
  
    /*





More information about the Olsr-cvs mailing list