From 776459774e2c221aa0036bbb9e719b810c144b86 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 27 Aug 2016 14:27:12 -0300 Subject: [PATCH] test --- iguana/iguana_peers.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index 3edaee686..e140f63a0 100755 --- a/iguana/iguana_peers.c +++ b/iguana/iguana_peers.c @@ -687,13 +687,8 @@ void iguana_startconnection(void *arg) int32_t i,n; uint16_t port; char ipaddr[64]; struct iguana_peer *addr = arg; struct iguana_info *coin = 0; if ( addr == 0 || (coin= iguana_coinfind(addr->symbol)) == 0 ) { - if ( addr != 0 && addr->symbol[0] != 0 ) - coin = iguana_coinfind(addr->symbol); - if ( addr == 0 || coin == 0 ) - { - printf("iguana_startconnection nullptrs addr.%p (%s) coin.%p\n",addr,addr!=0?addr->symbol:"",coin); - return; - } + printf("iguana_startconnection nullptrs addr.%p (%s) coin.%p\n",addr,addr!=0?addr->symbol:"",coin); + return; } if ( coin->virtualchain != 0 || coin->peers == 0 ) return; @@ -820,12 +815,13 @@ void iguana_launchpeer(struct iguana_info *coin,char *ipaddr,int32_t forceflag) if ( coin == 0 ) { printf("iguana_launchpeer: null coin?\n"); + return; } if ( coin->virtualchain != 0 ) return; if ( (addr= iguana_peerslot(coin,ipbits,forceflag)) != 0 ) iguana_launch(coin,"connection",iguana_startconnection,addr,IGUANA_CONNTHREAD); - else printf("skip %s, ",ipaddr); + else printf("iguana_launchpeer skip %s\n",ipaddr); } void *iguana_iAddriterator(struct iguana_info *coin,struct iguana_iAddr *iA)