From 5ce4a7c683a12156882a398fe2c93d0824842c0d Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Sep 2016 04:55:16 -0300 Subject: [PATCH] test --- basilisk/basilisk.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index 3383a81e9..2dd7bc7d5 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -771,9 +771,10 @@ void basilisk_msgprocess(struct supernet_info *myinfo,void *_addr,uint32_t sende int32_t basilisk_p2pQ_process(struct supernet_info *myinfo,int32_t maxiters) { - struct basilisk_p2pitem *ptr; char senderip[64]; uint32_t n=0,basilisktag,len = 0; + struct basilisk_p2pitem *ptr; char senderip[64]; uint32_t n=0,basilisktag,len; while ( n < maxiters && (ptr= queue_dequeue(&myinfo->p2pQ,0)) != 0 ) { + len = 0; expand_ipbits(senderip,ptr->ipbits); if ( ptr->type[0] == 'P' && ptr->type[1] == 'I' && ptr->type[2] == 'N' ) { @@ -795,12 +796,12 @@ int32_t basilisk_p2pQ_process(struct supernet_info *myinfo,int32_t maxiters) return(n); } -struct basilisk_p2pitem *basilisk_p2pitem_create(void *_coin,void *_addr,char *type,uint32_t ipbits,uint8_t *data,int32_t datalen) +struct basilisk_p2pitem *basilisk_p2pitem_create(struct iguana_info *coin,struct iguana_peer *addr,char *type,uint32_t ipbits,uint8_t *data,int32_t datalen) { struct basilisk_p2pitem *ptr; ptr = calloc(1,sizeof(*ptr) + datalen); - ptr->coin = _coin; - ptr->addr = _addr; + ptr->coin = coin; + ptr->addr = addr; ptr->ipbits = ipbits; safecopy(ptr->type,type,sizeof(ptr->type)); memcpy(ptr->data,data,datalen);