From abd081a59e9b7ace2ca135244cae4ffbfbdc150f Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 10 Oct 2016 16:06:27 -0300 Subject: [PATCH] test --- basilisk/basilisk.c | 4 ++-- basilisk/basilisk_MSG.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index 1b559b13e..f9e3cf096 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -846,7 +846,7 @@ int32_t basilisk_p2pQ_process(struct supernet_info *myinfo,int32_t maxiters) 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 = calloc(1,sizeof(*ptr) + datalen + 16); ptr->coin = coin; ptr->addr = addr; ptr->ipbits = ipbits; @@ -939,6 +939,7 @@ void basilisks_loop(void *arg) startmilli = OS_milliseconds(); basilisk_issued_purge(myinfo,600000); basilisk_iteration(myinfo); + basilisk_p2pQ_process(myinfo,777); if ( myinfo->NOTARY.RELAYID >= 0 ) { if ( (counter++ % 10) == 0 ) @@ -950,7 +951,6 @@ void basilisks_loop(void *arg) else endmilli = startmilli + 2000; while ( OS_milliseconds() < endmilli ) usleep(10000); - basilisk_p2pQ_process(myinfo,777); iter++; } } diff --git a/basilisk/basilisk_MSG.c b/basilisk/basilisk_MSG.c index 5363651eb..6c6eb698a 100755 --- a/basilisk/basilisk_MSG.c +++ b/basilisk/basilisk_MSG.c @@ -207,7 +207,7 @@ char *basilisk_respond_addmessage(struct supernet_info *myinfo,uint8_t *key,int3 return(clonestr("{\"result\":\"message updated\"}")); } } - msg = calloc(1,sizeof(*msg) + datalen); + msg = calloc(1,sizeof(*msg) + datalen + 16); msg->keylen = keylen; memcpy(msg->key,key,keylen); msg->datalen = datalen;