From a53570544c82cd108f643a16bb37e3c4b09d83e3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 30 Aug 2016 01:09:48 -0300 Subject: [PATCH] test --- basilisk/basilisk.c | 3 ++- basilisk/basilisk_MSG.c | 1 + basilisk/basilisk_ping.c | 2 +- includes/iguana_globals.h | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index e1ab38e42..a2b286c5d 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -844,8 +844,9 @@ void basilisks_loop(void *arg) { if ( now > msg->expiration ) { - printf("delete expired message.%p\n",msg); + printf("delete expired message.%p QUEUEITEMS.%d\n",msg,QUEUEITEMS); HASH_DELETE(hh,myinfo->messagetable,msg); + QUEUEITEMS--; free(msg); } } diff --git a/basilisk/basilisk_MSG.c b/basilisk/basilisk_MSG.c index edd9ee8eb..68679362d 100755 --- a/basilisk/basilisk_MSG.c +++ b/basilisk/basilisk_MSG.c @@ -33,6 +33,7 @@ char *basilisk_respond_addmessage(struct supernet_info *myinfo,uint8_t *key,int3 memcpy(msg->data,data,datalen); portable_mutex_lock(&myinfo->messagemutex); HASH_ADD_KEYPTR(hh,myinfo->messagetable,msg->key,msg->keylen,msg); + QUEUEITEMS++; portable_mutex_unlock(&myinfo->messagemutex); if ( sendping != 0 ) { diff --git a/basilisk/basilisk_ping.c b/basilisk/basilisk_ping.c index 0f1b3017c..3907547e0 100755 --- a/basilisk/basilisk_ping.c +++ b/basilisk/basilisk_ping.c @@ -261,7 +261,7 @@ int32_t basilisk_ping_gen(struct supernet_info *myinfo,uint8_t *data,int32_t max datalen += basilisk_ping_genMSG(myinfo,&data[datalen],maxlen - datalen); //for (i=0; iRELAYID); + printf(" <- output ping datalen.%d relay.%d Q.%d\n",datalen,myinfo->RELAYID,QUEUEITEMS); return(datalen); } diff --git a/includes/iguana_globals.h b/includes/iguana_globals.h index aa7eba976..c071939d1 100755 --- a/includes/iguana_globals.h +++ b/includes/iguana_globals.h @@ -56,7 +56,7 @@ int32_t IGUANA_NUMHELPERS = 1; // ALL globals must be here! CONDEXTERN char *COMMANDLINE_ARGFILE; CONDEXTERN char *Iguana_validcommands[]; -CONDEXTERN int32_t Showmode,Autofold,PANGEA_MAXTHREADS; +CONDEXTERN int32_t Showmode,Autofold,PANGEA_MAXTHREADS,QUEUEITEMS; CONDEXTERN struct gecko_chain *Categories; CONDEXTERN struct iguana_info *Allcoins;