jl777 8 years ago
parent
commit
cbd63a0e48
  1. 8
      basilisk/basilisk_MSG.c

8
basilisk/basilisk_MSG.c

@ -219,9 +219,9 @@ char *basilisk_respond_addmessage(struct supernet_info *myinfo,uint8_t *key,int3
msg->expiration = (uint32_t)time(NULL) + duration;
HASH_ADD_KEYPTR(hh,myinfo->messagetable,msg->key,msg->keylen,msg);
QUEUEITEMS++;
//int32_t i; for (i=0; i<BASILISK_KEYSIZE; i++)
// printf("%02x",key[i]);
//printf(" <- ADDMSG.[%d] exp %u %p (%p %p)\n",QUEUEITEMS,msg->expiration,msg,msg->hh.next,msg->hh.prev);
int32_t i; for (i=0; i<BASILISK_KEYSIZE; i++)
printf("%02x",key[i]);
printf(" <- ADDMSG.[%d] exp %u %p (%p %p)\n",QUEUEITEMS,msg->expiration,msg,msg->hh.next,msg->hh.prev);
portable_mutex_unlock(&myinfo->messagemutex);
if ( sendping != 0 )
queue_enqueue("basilisk_message",&myinfo->msgQ,&msg->DL,0);
@ -243,7 +243,7 @@ char *basilisk_respond_OUT(struct supernet_info *myinfo,char *CMD,void *addr,cha
duration = BASILISK_MSGDURATION;
}
//char str[65]; printf("add message.[%d] %s from.%s\n",datalen,bits256_str(str,hash),remoteaddr);
retstr = basilisk_respond_addmessage(myinfo,key,keylen,data,datalen,0,duration);
retstr = basilisk_respond_addmessage(myinfo,key,keylen,data,datalen,1,duration);
// printf("OUT keylen.%d datalen.%d\n",keylen,datalen);
return(retstr);
}

Loading…
Cancel
Save