From 88b5f55458aa765f0577df34c8391dccfe01cca1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 8 Jan 2016 19:22:55 -0300 Subject: [PATCH] test --- iguana/iguana_peers.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index 64a57e8a6..709066ee4 100755 --- a/iguana/iguana_peers.c +++ b/iguana/iguana_peers.c @@ -349,14 +349,20 @@ int32_t iguana_send(struct iguana_info *coin,struct iguana_peer *addr,uint8_t *s if ( addr == 0 ) return(-1); usock = addr->usock; - if ( usock < 0 || addr->dead != 0 || addr->relayflag == 0 ) + if ( usock < 0 || addr->dead != 0 ) { - if ( strcmp((char *)&serialized[4],"SuperNET") != 0 && addr->supernet == 0 ) - return(-1); + return(-1); } remains = len; - if ( strcmp((char *)&serialized[4],"SuperNET") == 0 || addr->supernet != 0 ) + if ( strcmp((char *)&serialized[4],"SuperNET") == 0 ) + { printf(" >>>>>>> send.(%s) %d bytes to %s supernet.%d\n",(char *)&serialized[4],len,addr->ipaddr,addr->supernet);// getchar(); + } + else + { + if ( addr->relayflag == 0 ) + return(-1); + } if ( strcmp((char *)&serialized[4],"ping") == 0 ) addr->sendmillis = OS_milliseconds(); if ( len > IGUANA_MAXPACKETSIZE )