Update in Version Numbering
diff --git a/nlsr_ndn.c b/nlsr_ndn.c
index 2d775ae..6d6a56c 100644
--- a/nlsr_ndn.c
+++ b/nlsr_ndn.c
@@ -352,17 +352,20 @@
/* Now comp points to the start of your potential number, and size is its length */
}
- int dbcmp=strncmp(nlsr->lsdb->version,(char *)comp,16);
+ int db_version=atoi((char *)comp);
+ int dbcmp=db_version- nlsr->lsdb->version;
+
+ //int dbcmp=strncmp(nlsr->lsdb->version,(char *)comp,16);
- printf (" dbcmp = %d \n",dbcmp);
+ //printf (" dbcmp = %d \n",dbcmp);
if(dbcmp > 0)
{
- printf("Has Updated database (Older: %s New: %s)\n",comp,nlsr->lsdb->version);
+ printf("Has Updated database (Older: %s New: %ld)\n",comp,nlsr->lsdb->version);
}
else
{
- printf("Data base is not updated than the older one (Older: %s New: %s)\n",comp,nlsr->lsdb->version);
+ printf("Data base is not updated than the older one (Older: %s New: %ld)\n",comp,nlsr->lsdb->version);
printf("Sending NACK Content back.....\n");
struct ccn_charbuf *data=ccn_charbuf_create();