Update
diff --git a/nlsr_ndn.c b/nlsr_ndn.c
index 9698b10..f0ee538 100644
--- a/nlsr_ndn.c
+++ b/nlsr_ndn.c
@@ -86,13 +86,6 @@
ccn_uri_append(c,info->interest_ccnb,info->pi->offset[CCN_PI_E],0);
printf("%s\n",ccn_charbuf_as_string(c));
ccn_charbuf_destroy(&c);
-
- printf("Content Received for name: ");
- struct ccn_charbuf*cc;
- cc=ccn_charbuf_create();
- ccn_uri_append(cc,info->content_ccnb,info->pco->offset[CCN_PCO_E],0);
- printf("%s\n",ccn_charbuf_as_string(cc));
- ccn_charbuf_destroy(&cc);
process_incoming_content(selfp, info);
@@ -177,6 +170,13 @@
}
+ const unsigned char *comp_ptr1;
+ size_t comp_size;
+ int res;
+
+ res=ccn_name_comp_get(info->content_ccnb, info->content_comps,info->interest_comps->n-1,&comp_ptr1, &comp_size);
+
+ printf("Database Version: %s \n",(char *)comp_ptr1);
}
@@ -275,11 +275,6 @@
for(i=0;i<name_comps;i++)
{
res=ccn_name_comp_strcmp(info->interest_ccnb,info->interest_comps,i,"nlsr");
-
-
- res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,i,&comp_ptr1, &comp_size);
- printf("%s \n",comp_ptr1);
-
if( res == 0)
{
nlsr_position=i;
@@ -288,8 +283,7 @@
}
res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,nlsr_position+1,&comp_ptr1, &comp_size);
-
-
+
printf("Det= %s \n",comp_ptr1);
if(!strcmp((char *)comp_ptr1,"lsdb"))