Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
a53570544c
  1. 3
      basilisk/basilisk.c
  2. 1
      basilisk/basilisk_MSG.c
  3. 2
      basilisk/basilisk_ping.c
  4. 2
      includes/iguana_globals.h

3
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);
}
}

1
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 )
{

2
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; i<datalen; i++)
// printf("%02x",data[i]);
printf(" <- output ping datalen.%d relay.%d\n",datalen,myinfo->RELAYID);
printf(" <- output ping datalen.%d relay.%d Q.%d\n",datalen,myinfo->RELAYID,QUEUEITEMS);
return(datalen);
}

2
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;

Loading…
Cancel
Save