Automated merge with http://olsrd.sf.net/hg/olsrd
authorHannes Gredler <hannes@gredler.at>
Fri, 29 Feb 2008 14:31:57 +0000 (15:31 +0100)
committerHannes Gredler <hannes@gredler.at>
Fri, 29 Feb 2008 14:31:57 +0000 (15:31 +0100)
12 files changed:
1  2 
lib/bmf/src/NetworkInterfaces.c
lib/httpinfo/src/olsrd_httpinfo.c
lib/nameservice/src/mapwrite.c
lib/nameservice/src/nameservice.c
lib/tas/src/plugin.c
lib/txtinfo/src/olsrd_txtinfo.c
src/hysteresis.c
src/link_set.c
src/lq_route.c
src/routing_table.c
src/tc_set.c
src/two_hop_neighbor_table.c

Simple merge
@@@ -992,14 -992,14 +992,14 @@@ static int build_neigh_body(char *buf, 
                         "<td>%d</td>"
                         "<td align=\"right\">%s</td>"
                         "<td align=\"right\">%s</td>\n",
 -                       olsr_etx_to_string(link->loss_link_quality),
 +                       fpmtoa(link->loss_link_quality),
                         link->lost_packets,
                         link->total_packets,
 -                       olsr_etx_to_string(link->neigh_link_quality),
 -                       olsr_etx_to_string(olsr_calc_link_etx(link)));
 +                       fpmtoa(link->neigh_link_quality),
 +                       etxtoa(olsr_calc_link_etx(link)));
      }
      size += snprintf(&buf[size], bufsize-size, "</tr>\n");
-   }
+   } OLSR_FOR_ALL_LINK_ENTRIES_END(link);
  
    size += snprintf(&buf[size], bufsize-size, "</table>\n");
  
Simple merge
Simple merge
@@@ -120,12 -121,18 +121,18 @@@ int iterLinkTabNext(char *buff, int len
             rawIpAddrToString(&iterLinkTab->local_iface_addr, ipAddrLen),
             rawIpAddrToString(&iterLinkTab->neighbor_iface_addr, ipAddrLen),
             rawIpAddrToString(&iterLinkTab->neighbor->neighbor_main_addr, ipAddrLen),
 -           olsr_etx_to_string(iterLinkTab->L_link_quality),
 -           olsr_etx_to_string(iterLinkTab->loss_link_quality),
 -           olsr_etx_to_string(iterLinkTab->neigh_link_quality),
 -           olsr_etx_to_string(etx));
 +           fpmtoa(iterLinkTab->L_link_quality),
 +           fpmtoa(iterLinkTab->loss_link_quality),
 +           fpmtoa(iterLinkTab->neigh_link_quality),
 +           etxtoa(etx));
  
-   iterLinkTab = iterLinkTab->next;
+   link_node = iterLinkTab->link_list.next;
+   if (link_node != &link_entry_head) {
+     iterLinkTab = list2link(link_node);
+   } else {
+     iterLinkTab = NULL;
+   }
  
    return 0;
  }
@@@ -311,14 -310,14 +310,14 @@@ static void ipc_print_neigh_link(void
        ipc_sendf( "%s\t%s\t%s\t%s\t%d\t%d\t%s\t%s\t\n",
                     olsr_ip_to_string(&buf1, &link->local_iface_addr),
                     olsr_ip_to_string(&buf2, &link->neighbor_iface_addr),
 -                   olsr_etx_to_string(link->L_link_quality), 
 -                   olsr_etx_to_string(link->loss_link_quality),
 +                   fpmtoa(link->L_link_quality), 
 +                   fpmtoa(link->loss_link_quality),
                     link->lost_packets, 
                     link->total_packets,
 -                   olsr_etx_to_string(link->neigh_link_quality), 
 -                   olsr_etx_to_string(olsr_calc_link_etx(link)));
 +                   fpmtoa(link->neigh_link_quality), 
 +                   etxtoa(olsr_calc_link_etx(link)));
-         link = link->next;
-     }
+     } OLSR_FOR_ALL_LINK_ENTRIES_END(link);
      ipc_sendf("\nTable: Neighbors\nIP address\tSYM\tMPR\tMPRS\tWillingness\t2 Hop Neighbors\n");
  
      /* Neighbors */
Simple merge
diff --cc src/link_set.c
@@@ -1033,13 -928,13 +928,13 @@@ void olsr_print_link_set(void
  
      OLSR_PRINTF(1, "%-*s  %s  %s  %-3d    %-3d    %s  %s\n",
                  addrsize, olsr_ip_to_string(&buf, &walker->neighbor_iface_addr),
 -                olsr_etx_to_string(walker->L_link_quality),
 -                olsr_etx_to_string(walker->loss_link_quality),
 +                fpmtoa(walker->L_link_quality),
 +                fpmtoa(walker->loss_link_quality),
                walker->lost_packets,
                  walker->total_packets,
 -              olsr_etx_to_string(walker->neigh_link_quality),
 -                olsr_etx_to_string(etx));
 +              fpmtoa(walker->neigh_link_quality),
 +                etxtoa(etx));
-   }
+   } OLSR_FOR_ALL_LINK_ENTRIES_END(walker);
  #endif
  }
  
diff --cc src/lq_route.c
Simple merge
@@@ -698,9 -698,9 +698,9 @@@ olsr_print_routing_table(const struct a
           rtp_tree_node != NULL;
           rtp_tree_node = avl_walk_next_c(rtp_tree_node)) {
        const struct rt_path * const rtp = rtp_tree_node->data;
-       printf("\tfrom %s, etx %s, metric %u, via %s, %s, v %u\n",
+       OLSR_PRINTF(6, "\tfrom %s, etx %s, metric %u, via %s, %s, v %u\n",
               olsr_ip_to_string(&origstr, &rtp->rtp_originator),
 -             olsr_etx_to_string(rtp->rtp_metric.etx),
 +             etxtoa(rtp->rtp_metric.etx),
               rtp->rtp_metric.hops,
               olsr_ip_to_string(&gwstr, &rtp->rtp_nexthop.gateway),
               if_ifwithindex_name(rt->rt_nexthop.iif_index),
diff --cc src/tc_set.c
@@@ -751,11 -746,10 +746,10 @@@ olsr_print_tc_table(void
    struct tc_entry *tc;
    const int ipwidth = olsr_cnf->ip_version == AF_INET ? 15 : 30;
  
-   OLSR_PRINTF(1,
-               "\n--- %02d:%02d:%02d.%02d ------------------------------------------------- TOPOLOGY\n\n"
-               "%-*s %-*s %-5s  %-5s  %s  %s\n",
-               nowtm->tm_hour, nowtm->tm_min, nowtm->tm_sec, (int)now.tv_usec / 10000,
+   OLSR_PRINTF(1, "\n--- %s ------------------------------------------------- TOPOLOGY\n\n"
+               "%-*s %-*s %-5s  %-5s  %s\n",
+               olsr_wallclock_string(),
 -              ipwidth, "Source IP addr", ipwidth, "Dest IP addr", "LQ", "ILQ", "ETX");
 +              ipwidth, "Source IP addr", ipwidth, "Dest IP addr", "LQ", "ILQ", "ETX", "UP");
  
    OLSR_FOR_ALL_TC_ENTRIES(tc) {
      struct tc_edge_entry *tc_edge;
Simple merge