Browse Source

test

etomic
jl777 8 years ago
parent
commit
4b23ca7c44
  1. 1
      basilisk/basilisk_MSG.c
  2. 2
      iguana/dpow/dpow_network.c

1
basilisk/basilisk_MSG.c

@ -217,6 +217,7 @@ char *basilisk_respond_addmessage(struct supernet_info *myinfo,uint8_t *key,int3
HASH_ADD_KEYPTR(hh,myinfo->messagetable,msg->key,msg->keylen,msg); HASH_ADD_KEYPTR(hh,myinfo->messagetable,msg->key,msg->keylen,msg);
QUEUEITEMS++; QUEUEITEMS++;
portable_mutex_unlock(&myinfo->messagemutex); portable_mutex_unlock(&myinfo->messagemutex);
printf("add message keylen.%d [%d]\n",msg->keylen,datalen);
//if ( myinfo->NOTARY.RELAYID >= 0 ) //if ( myinfo->NOTARY.RELAYID >= 0 )
// dpow_handler(myinfo,msg); // dpow_handler(myinfo,msg);
if ( sendping != 0 ) if ( sendping != 0 )

2
iguana/dpow/dpow_network.c

@ -170,7 +170,7 @@ void dex_packet(struct supernet_info *myinfo,struct dex_nanomsghdr *dexp,int32_t
//for (i=0; i<size; i++) //for (i=0; i<size; i++)
// printf("%02x",((uint8_t *)dexp)[i]); // printf("%02x",((uint8_t *)dexp)[i]);
printf(" uniq.%s DEX_PACKET.[%d] crc.%x lag.%d (%d %d)\n",dexp->handler,size,calc_crc32(0,dexp->packet,dexp->datalen),(int32_t)(time(NULL)-dexp->timestamp),dexp->size,dexp->datalen); printf(" uniq.%s DEX_PACKET.[%d] crc.%x lag.%d (%d %d)\n",dexp->handler,size,calc_crc32(0,dexp->packet,dexp->datalen),(int32_t)(time(NULL)-dexp->timestamp),dexp->size,dexp->datalen);
if ( strcmp(dexp->handler,"DEX") == 0 )//dexp->datalen > BASILISK_KEYSIZE ) if ( strcmp(dexp->handler,"DEX") == 0 && dexp->datalen > BASILISK_KEYSIZE )
{ {
if ( (retstr= basilisk_respond_addmessage(myinfo,dexp->packet,BASILISK_KEYSIZE,&dexp->packet[BASILISK_KEYSIZE],dexp->datalen-BASILISK_KEYSIZE,0,BASILISK_DEXDURATION)) != 0 ) if ( (retstr= basilisk_respond_addmessage(myinfo,dexp->packet,BASILISK_KEYSIZE,&dexp->packet[BASILISK_KEYSIZE],dexp->datalen-BASILISK_KEYSIZE,0,BASILISK_DEXDURATION)) != 0 )
free(retstr); free(retstr);

Loading…
Cancel
Save