jl777 8 years ago
parent
commit
6e409d13e4
  1. 2
      basilisk/basilisk.c
  2. 3
      basilisk/basilisk_ping.c
  3. 2
      iguana/iguana_peers.c

2
basilisk/basilisk.c

@ -871,7 +871,7 @@ void basilisks_loop(void *arg)
}
//portable_mutex_unlock(&myinfo->allcoins_mutex);
basilisk_ping_send(myinfo,notary);
}
} else printf("not notary %p %d\n",notary,myinfo->NOTARY.RELAYID);
if ( myinfo->expiration != 0 )
{
HASH_ITER(hh,myinfo->allcoins,coin,tmpcoin)

3
basilisk/basilisk_ping.c

@ -272,7 +272,10 @@ void basilisk_ping_send(struct supernet_info *myinfo,struct iguana_info *notary)
{
struct iguana_peer *addr; char ipaddr[64]; struct basilisk_relay *rp; uint32_t r; int32_t i,j,incr,datalen=0; uint64_t alreadysent;
if ( notary == 0 || myinfo->NOTARY.NUMRELAYS <= 0 || myinfo->IAMNOTARY == 0 )
{
printf("skip ping send %p %d %d\n",notary,myinfo->NOTARY.NUMRELAYS,myinfo->IAMNOTARY);
return;
}
if ( myinfo->pingbuf == 0 )
myinfo->pingbuf = malloc(IGUANA_MAXPACKETSIZE);
datalen = basilisk_ping_gen(myinfo,&myinfo->pingbuf[sizeof(struct iguana_msghdr)],IGUANA_MAXPACKETSIZE-sizeof(struct iguana_msghdr));

2
iguana/iguana_peers.c

@ -557,7 +557,7 @@ int32_t iguana_queue_send(struct iguana_peer *addr,int32_t delay,uint8_t *serial
packet->embargo.millis += delay;
}
memcpy(packet->serialized,serialized,datalen);
if ( addr->supernet != 0 )
if ( 0 && addr->supernet != 0 )
printf("%p queue send.(%s) %d to (%s)\n",packet,serialized+4,datalen,addr->ipaddr);
queue_enqueue("sendQ",&addr->sendQ,&packet->DL,0);
return(datalen);

Loading…
Cancel
Save