Bug Fix (0) Face
diff --git a/nlsr-sync-0.0/nlsr_npt.c b/nlsr-sync-0.0/nlsr_npt.c
index 9ff24ce..598b04f 100755
--- a/nlsr-sync-0.0/nlsr_npt.c
+++ b/nlsr-sync-0.0/nlsr_npt.c
@@ -176,7 +176,6 @@
void
update_ccnd_fib_for_orig_router(char *orig_router)
{
- // problem in this method I think ... need to fix it.
if ( nlsr->debugging )
{
@@ -226,10 +225,11 @@
{
last_face=0;
}
- else if ( nlsr->multi_path_face_num == 0)
+ else
{
last_face=num_face-nlsr->multi_path_face_num;
}
+
}
int i,j, nl_element;
@@ -247,6 +247,8 @@
for( j=first_face; j>= last_face; j--)
{
+ printf("FIB Entry Name: %s Face: %d Router Cost: %d \n",nle->name,faces[j],route_costs[j]);
+
if ( is_neighbor(orig_router) == 0 )
{
if ( nlsr->debugging )
@@ -349,7 +351,7 @@
{
last_face=0;
}
- else if ( nlsr->multi_path_face_num == 0)
+ else
{
last_face=num_face-nlsr->multi_path_face_num;
}
@@ -364,7 +366,7 @@
printf("Deleting face: Name:%s Face: %d\n",nle->name,faces[j]);
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"Deleting face: Name:%s Face: %d\n",nle->name,faces[j]);
- add_delete_ccn_face_by_face_id(nlsr->ccn, (const char *)nle->name, OP_UNREG, faces[j]);
+ //add_delete_ccn_face_by_face_id(nlsr->ccn, (const char *)nle->name, OP_UNREG, faces[j]);
}
else
{
@@ -374,7 +376,7 @@
printf("Deleting face: Name:%s Face: %d\n",nle->name,faces[j]);
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"Deleting face: Name:%s Face: %d\n",nle->name,faces[j]);
- add_delete_ccn_face_by_face_id(nlsr->ccn, (const char *)nle->name, OP_UNREG, faces[j]);
+ //add_delete_ccn_face_by_face_id(nlsr->ccn, (const char *)nle->name, OP_UNREG, faces[j]);
}
}
@@ -836,7 +838,7 @@
printf("Deleting face: Name:%s Face: %d\n",nle->name,fle->next_hop_face);
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"Deleting face: Name:%s Face: %d\n",nle->name,fle->next_hop_face);
- add_delete_ccn_face_by_face_id(nlsr->ccn, (const char *)nle->name, OP_UNREG, fle->next_hop_face);
+ //add_delete_ccn_face_by_face_id(nlsr->ccn, (const char *)nle->name, OP_UNREG, fle->next_hop_face);
}
@@ -1047,7 +1049,7 @@
printf("Deleting face: Name:%s Face: %d\n",nle->name,faces[j]);
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"Deleting face: Name:%s Face: %d\n",nle->name,faces[j]);
- add_delete_ccn_face_by_face_id(nlsr->ccn, (const char *)nle->name, OP_UNREG, faces[j]);
+ //add_delete_ccn_face_by_face_id(nlsr->ccn, (const char *)nle->name, OP_UNREG, faces[j]);
}
else
{
@@ -1057,7 +1059,7 @@
printf("Deleting face: Name:%s Face: %d\n",nle->name,faces[j]);
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"Deleting face: Name:%s Face: %d\n",nle->name,faces[j]);
- add_delete_ccn_face_by_face_id(nlsr->ccn, (const char *)nle->name, OP_UNREG, faces[j]);
+ //add_delete_ccn_face_by_face_id(nlsr->ccn, (const char *)nle->name, OP_UNREG, faces[j]);
}
}
}