update versioning
diff --git a/nlsr_adl.c b/nlsr_adl.c
index f208caf..c55efe4 100644
--- a/nlsr_adl.c
+++ b/nlsr_adl.c
@@ -26,7 +26,7 @@
add_adjacent_to_adl(struct ndn_neighbor *nbr)
{
printf("\nadd_adjacent_to_adl called\n");
- printf("Neighbor: %s Length: %d Face: %d Status: %d\n",nbr->neighbor->name,nbr->neighbor->length,nbr->face, nbr->status);
+ printf("Neighbor: %s Length: %d Face: %d Status: %d\n",ccn_charbuf_as_string(nbr->neighbor),(int)nbr->neighbor->length,nbr->face, nbr->status);
struct ndn_neighbor *hnbr=(struct ndn_neighbor *)malloc(sizeof(struct ndn_neighbor*));
@@ -35,20 +35,23 @@
int res;
hashtb_start(nlsr->adl, e);
- res = hashtb_seek(e, nbr->neighbor->name , nbr->neighbor->length, 0);
+ res = hashtb_seek(e, nbr->neighbor->buf , nbr->neighbor->length, 0);
if(res == HT_NEW_ENTRY )
{
hnbr = e->data;
-
- hnbr->neighbor=(struct name_prefix *)malloc(sizeof(struct name_prefix *));
- hnbr->neighbor->name=(char *)malloc(nbr->neighbor->length);
- memcpy(hnbr->neighbor->name,nbr->neighbor->name,nbr->neighbor->length);
- hnbr->neighbor->name[nbr->neighbor->length]='\0';
+ hnbr->neighbor=ccn_charbuf_create();
+ //res=ccn_name_from_uri(hnbr->neighbor,ccn_charbuf_as_string(nbr->neighbor));
+ ccn_charbuf_append_string(hnbr->neighbor,ccn_charbuf_as_string(nbr->neighbor));
+
+ //hnbr->neighbor=(struct name_prefix *)malloc(sizeof(struct name_prefix *));
+ //hnbr->neighbor->name=(char *)malloc(nbr->neighbor->length);
+ //memcpy(hnbr->neighbor->name,nbr->neighbor->name,nbr->neighbor->length);
+ //hnbr->neighbor->name[nbr->neighbor->length]='\0';
//hnbr->last_lsdb_version=(char *)malloc(15);
+ //hnbr->neighbor->length=nbr->neighbor->length;
- hnbr->neighbor->length=nbr->neighbor->length;
hnbr->face=nbr->face;
hnbr->status=nbr->status;
//memcpy(hnbr->last_lsdb_version,"00000000000000",14);
@@ -82,7 +85,7 @@
for(i=0;i<adl_element;i++)
{
nbr=e->data;
- printf("Neighbor: %s Length: %d Face: %d Status: %d LSDB Version: %ld \n",nbr->neighbor->name,nbr->neighbor->length,nbr->face, nbr->status, nbr->last_lsdb_version);
+ printf("Neighbor: %s Length: %d Face: %d Status: %d LSDB Version: %ld \n",ccn_charbuf_as_string(nbr->neighbor),(int)nbr->neighbor->length,nbr->face, nbr->status, nbr->last_lsdb_version);
hashtb_next(e);
}