spf: tc->path_cost is a route cost, fix level 2 OLSR_PRINTF messages
[olsrd.git] / src / olsr_spf.c
index 14fbf6d..86d251d 100644 (file)
@@ -109,7 +109,7 @@ olsr_spf_add_cand_tree(struct avl_tree *tree, struct tc_entry *tc)
 
 #ifdef DEBUG
   OLSR_PRINTF(2, "SPF: insert candidate %s, cost %s\n", olsr_ip_to_string(&buf, &tc->addr),
-              get_linkcost_text(tc->path_cost, false, &lqbuffer));
+              get_linkcost_text(tc->path_cost, true, &lqbuffer));
 #endif /* DEBUG */
 
   avl_insert(tree, &tc->cand_tree_node, AVL_DUP);
@@ -130,7 +130,7 @@ olsr_spf_del_cand_tree(struct avl_tree *tree, struct tc_entry *tc)
   struct lqtextbuffer lqbuffer;
 #endif /* NODEBUG */
   OLSR_PRINTF(2, "SPF: delete candidate %s, cost %s\n", olsr_ip_to_string(&buf, &tc->addr),
-              get_linkcost_text(tc->path_cost, false, &lqbuffer));
+              get_linkcost_text(tc->path_cost, true, &lqbuffer));
 #endif /* DEBUG */
 
   avl_delete(tree, &tc->cand_tree_node);
@@ -151,7 +151,7 @@ olsr_spf_add_path_list(struct list_node *head, int *path_count, struct tc_entry
 
 #ifdef DEBUG
   OLSR_PRINTF(2, "SPF: append path %s, cost %s, via %s\n", olsr_ip_to_string(&pathbuf, &tc->addr),
-              get_linkcost_text(tc->path_cost, false, &lqbuffer), tc->next_hop ? olsr_ip_to_string(&nbuf,
+              get_linkcost_text(tc->path_cost, true, &lqbuffer), tc->next_hop ? olsr_ip_to_string(&nbuf,
                                                                                                    &tc->next_hop->
                                                                                                    neighbor_iface_addr) : "-");
 #endif /* DEBUG */
@@ -192,7 +192,7 @@ olsr_spf_relax(struct avl_tree *cand_tree, struct tc_entry *tc)
   struct lqtextbuffer lqbuffer;
 #endif /* NODEBUG */
   OLSR_PRINTF(2, "SPF: exploring node %s, cost %s\n", olsr_ip_to_string(&buf, &tc->addr),
-              get_linkcost_text(tc->path_cost, false, &lqbuffer));
+              get_linkcost_text(tc->path_cost, true, &lqbuffer));
 #endif /* DEBUG */
 
   /*