From 13a6a1d0d0bda0a2e72aa5a7dcae11aa70226e27 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 12 Jan 2016 13:00:52 -0300 Subject: [PATCH] test --- iguana/iguana_peers.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index 289b1dd23..143006ccf 100755 --- a/iguana/iguana_peers.c +++ b/iguana/iguana_peers.c @@ -340,7 +340,7 @@ int32_t iguana_socket(int32_t bindflag,char *hostname,uint16_t port) closesocket(sock); return(-1); } - if ( bindflag != 0 && listen(sock,128) != 0 ) + if ( bindflag != 0 && listen(sock,16) != 0 ) { printf("listen(%s) port.%d failed: %s sock.%d. errno.%d\n",hostname,port,strerror(errno),sock,errno); if ( sock >= 0 ) @@ -504,12 +504,10 @@ void _iguana_processmsg(struct iguana_info *coin,int32_t usock,struct iguana_pee int32_t len,recvlen; void *buf = _buf; struct iguana_msghdr H; if ( coin->peers.shuttingdown != 0 || addr->dead != 0 ) return; - if ( 0 && addr->supernet != 0 ) - printf("%p got.(%s) from %s | usock.%d ready.%u dead.%u\n",addr,H.command,addr->ipaddr,addr->usock,addr->ready,addr->dead); memset(&H,0,sizeof(H)); if ( (recvlen= (int32_t)iguana_recv(usock,(uint8_t *)&H,sizeof(H))) == sizeof(H) ) { - //printf("%p got.(%s) recvlen.%d from %s | usock.%d ready.%u dead.%u\n",addr,H.command,recvlen,addr->ipaddr,addr->usock,addr->ready,addr->dead); + printf("%p got.(%s) recvlen.%d from %s | usock.%d ready.%u dead.%u\n",addr,H.command,recvlen,addr->ipaddr,addr->usock,addr->ready,addr->dead); if ( coin->peers.shuttingdown != 0 || addr->dead != 0 ) return; if ( (len= iguana_validatehdr(&H)) >= 0 )