From 6e409d13e489030c29f8dfd0e62c49cd04bf7b3e Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 19 Sep 2016 08:51:23 -0300 Subject: [PATCH] test --- basilisk/basilisk.c | 2 +- basilisk/basilisk_ping.c | 3 +++ iguana/iguana_peers.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index 7f1f1c735..f1a90c013 100755 --- a/basilisk/basilisk.c +++ b/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) diff --git a/basilisk/basilisk_ping.c b/basilisk/basilisk_ping.c index 338e87315..34cd5dd30 100755 --- a/basilisk/basilisk_ping.c +++ b/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)); diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index b9ca858eb..8eeff05dc 100755 --- a/iguana/iguana_peers.c +++ b/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);