NLSR Api server finished
diff --git a/nlsr_route.c b/nlsr_route.c
index 0fbe8fd..8537b2e 100644
--- a/nlsr_route.c
+++ b/nlsr_route.c
@@ -71,7 +71,8 @@
adj_matrix[i] = malloc(map_element * sizeof(int));
}
make_adj_matrix(adj_matrix,map_element);
- print_adj_matrix(adj_matrix,map_element);
+ if ( nlsr->debugging )
+ print_adj_matrix(adj_matrix,map_element);
long int source=get_mapping_no(nlsr->router_name);
long int *parent=(long int *)malloc(map_element * sizeof(long int));
@@ -202,8 +203,18 @@
me=e->data;
if(me->mapping != source)
{
- print_path(parent,(long int)me->mapping);
- printf("\n");
+
+ if ( nlsr->debugging )
+ {
+ print_path(parent,(long int)me->mapping);
+ printf("\n");
+ }
+ if ( nlsr->detailed_logging )
+ {
+ print_path(parent,(long int)me->mapping);
+ writeLogg(__FILE__,__FUNCTION__,__LINE__,"\n");
+ }
+
}
hashtb_next(e);
}
@@ -266,7 +277,6 @@
{
if (parent[dest] != EMPTY_PARENT )
print_path(parent,parent[dest]);
-
printf(" %ld",dest);
}
@@ -987,7 +997,10 @@
hashtb_end(e);
- printf("\n");
+ if ( nlsr->debugging )
+ printf("\n");
+ if ( nlsr->detailed_logging )
+ writeLogg(__FILE__,__FUNCTION__,__LINE__,"\n");
}