Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
46943aa70e
  1. 2
      iguana/iguana_accept.c
  2. 2
      iguana/iguana_peers.c

2
iguana/iguana_accept.c

@ -64,7 +64,7 @@ void iguana_acceptloop(void *args)
{ {
int32_t bindsock,sock; struct iguana_accept *ptr; struct iguana_peer *addr; struct iguana_info *coin = args; int32_t bindsock,sock; struct iguana_accept *ptr; struct iguana_peer *addr; struct iguana_info *coin = args;
socklen_t clilen; struct sockaddr_in cli_addr; char ipaddr[64]; uint32_t ipbits; socklen_t clilen; struct sockaddr_in cli_addr; char ipaddr[64]; uint32_t ipbits;
bindsock = iguana_socket(1,"127.0.0.1",coin->chain->portp2p); bindsock = iguana_socket(1,"0.0.0.0",coin->chain->portp2p);
printf("iguana_bindloop 127.0.0.1:%d bind sock.%d\n",coin->chain->portp2p,bindsock); printf("iguana_bindloop 127.0.0.1:%d bind sock.%d\n",coin->chain->portp2p,bindsock);
while ( bindsock >= 0 ) while ( bindsock >= 0 )
{ {

2
iguana/iguana_peers.c

@ -248,6 +248,8 @@ void iguana_iAkill(struct iguana_info *coin,struct iguana_peer *addr,int32_t mar
//memset(addr,0,sizeof(*addr)); //memset(addr,0,sizeof(*addr));
addr->usock = -1; addr->usock = -1;
addr->pending = 0; addr->pending = 0;
memset(addr->ipaddr,0,sizeof(addr->ipaddr));
addr->ipbits = 0;
if ( rank > 0 ) if ( rank > 0 )
iguana_possible_peer(coin,ipaddr); iguana_possible_peer(coin,ipaddr);
} }

Loading…
Cancel
Save