From d031ed46bfdc14f6afbc45fcacea48ba98c4f3ab Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 30 Jun 2016 16:37:45 -0300 Subject: [PATCH] test --- basilisk/basilisk_DEX.c | 7 +++++-- basilisk/basilisk_ping.c | 12 ++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/basilisk/basilisk_DEX.c b/basilisk/basilisk_DEX.c index e97c4d2cd..a5ee67ab3 100755 --- a/basilisk/basilisk_DEX.c +++ b/basilisk/basilisk_DEX.c @@ -185,7 +185,7 @@ struct basilisk_relay *basilisk_request_ensure(struct supernet_info *myinfo,uint int32_t basilisk_ping_processDEX(struct supernet_info *myinfo,uint32_t senderipbits,uint8_t *data,int32_t datalen) { - int32_t i,len=0; struct basilisk_relay *relay; struct basilisk_request R; uint8_t clen,serialized[256]; uint16_t sn; uint32_t crc; + int32_t i,n,len=0; struct basilisk_relay *relay; struct basilisk_request R; uint8_t clen,serialized[256]; uint16_t sn; uint32_t crc; portable_mutex_lock(&myinfo->DEX_reqmutex); len += iguana_rwnum(0,&data[len],sizeof(sn),&sn); if ( (relay= basilisk_request_ensure(myinfo,senderipbits,sn)) != 0 ) @@ -198,7 +198,10 @@ int32_t basilisk_ping_processDEX(struct supernet_info *myinfo,uint32_t senderipb if ( relay->numrequests < relay->maxrequests ) { memcpy(serialized,&data[len],clen); - len += basilisk_rwDEXquote(0,serialized,&R); + n = basilisk_rwDEXquote(0,serialized,&R); + if ( n != clen ) + printf("n.%d clen.%d\n",n,clen); + len += clen; crc = basilisk_requestid(&R); if ( crc == R.requestid ) { diff --git a/basilisk/basilisk_ping.c b/basilisk/basilisk_ping.c index 9f8f27e9e..fb2e98509 100755 --- a/basilisk/basilisk_ping.c +++ b/basilisk/basilisk_ping.c @@ -179,9 +179,9 @@ void basilisk_ping_process(struct supernet_info *myinfo,struct iguana_peer *addr if ( len != datalen ) printf("PING got %d, processed.%d from (%s)\n",datalen,len,ipbuf); //else printf("\n"); - //for (i=0; irelays[i]); datalen += basilisk_ping_genDEX(myinfo,&data[datalen],maxlen - datalen); datalen += basilisk_ping_genMSG(myinfo,&data[datalen],maxlen - datalen); - //for (i=0; i