Update in Version Numbering
diff --git a/nlsr_adl.c b/nlsr_adl.c
index 94ccb42..5f3e71c 100644
--- a/nlsr_adl.c
+++ b/nlsr_adl.c
@@ -42,13 +42,14 @@
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->last_lsdb_version=(char *)malloc(15);
+ //hnbr->last_lsdb_version=(char *)malloc(15);
hnbr->neighbor->length=nbr->neighbor->length;
hnbr->face=nbr->face;
hnbr->status=nbr->status;
- memcpy(hnbr->last_lsdb_version,"00000000000000",14);
- memcpy(hnbr->last_lsdb_version+strlen(hnbr->last_lsdb_version),"\0",1);
+ hnbr->last_lsdb_version=0;
+ //memcpy(hnbr->last_lsdb_version,"00000000000000",14);
+ //memcpy(hnbr->last_lsdb_version+strlen(hnbr->last_lsdb_version),"\0",1);
struct hashtb_param param_luq = {0};
hnbr->lsa_update_queue=hashtb_create(200, ¶m_luq);
@@ -76,7 +77,7 @@
for(i=0;i<adl_element;i++)
{
nbr=e->data;
- printf("Neighbor: %s Length: %d Face: %d Status: %d LSDB Version: %s \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",nbr->neighbor->name,nbr->neighbor->length,nbr->face, nbr->status, nbr->last_lsdb_version);
hashtb_next(e);
}
@@ -109,7 +110,7 @@
void
-update_adjacent_lsdb_version_to_adl(struct ccn_charbuf *nbr, char *version)
+update_adjacent_lsdb_version_to_adl(struct ccn_charbuf *nbr, long int version)
{
printf("update_adjacent_status_to_adl called \n");
@@ -125,7 +126,9 @@
assert( res == HT_OLD_ENTRY);
nnbr=e->data;
- memcpy(nnbr->last_lsdb_version,version,strlen(version)+1);
+ nnbr->last_lsdb_version=version;
+
+ //memcpy(nnbr->last_lsdb_version,version,strlen(version)+1);
hashtb_end(e);
}