jl777 8 years ago
parent
commit
fee0a5b868
  1. 6
      basilisk/basilisk_ping.c
  2. 4
      iguana/iguana_peers.c

6
basilisk/basilisk_ping.c

@ -247,7 +247,7 @@ void basilisk_ping_process(struct supernet_info *myinfo,struct iguana_peer *addr
//else printf("\n");
//for (i=0; i<datalen; i++)
// printf("%02x",data[i]);
//printf("<<<<<<<<<<< input ping from.(%s) rel.%d numrelays.%d datalen.%d relay.%d Q.%d\n",ipbuf,basilisk_relayid(myinfo,(uint32_t)calc_ipbits(ipbuf)),numrelays,datalen,myinfo->RELAYID,QUEUEITEMS);
printf("<<<<<<<<<<< input ping from.(%s) rel.%d numrelays.%d datalen.%d relay.%d Q.%d\n",ipbuf,basilisk_relayid(myinfo,(uint32_t)calc_ipbits(ipbuf)),numrelays,datalen,myinfo->NOTARY.RELAYID,QUEUEITEMS);
}
int32_t basilisk_ping_gen(struct supernet_info *myinfo,uint8_t *data,int32_t maxlen)
@ -298,10 +298,10 @@ void basilisk_ping_send(struct supernet_info *myinfo,struct iguana_info *notary)
{
if ( iguana_queue_send(addr,0,myinfo->pingbuf,"SuperNETPIN",datalen) <= 0 )
printf("error sending %d to (%s)\n",datalen,addr->ipaddr);
else if ( 0 && datalen > 200 )
else //if ( datalen > 200 )
fprintf(stderr,"+(%s).%d ",ipaddr,i);
} //else fprintf(stderr,"-(%s).%d ",ipaddr,i);
}
//printf("my RELAYID.%d of %d\n",myinfo->RELAYID,NUMRELAYS);
printf("my RELAYID.%d of %d\n",myinfo->NOTARY.RELAYID,myinfo->NOTARY.NUMRELAYS);
}

4
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 ( 0 && addr->basilisk != 0 )
if ( 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);
@ -584,7 +584,7 @@ int32_t iguana_recv(char *ipaddr,int32_t usock,uint8_t *recvbuf,int32_t len)
remains -= recvlen;
//int32_t i; for (i=0; i<recvlen; i++)
// printf("%02x",recvbuf[i]);
printf("got %d remains.%d of total.%d from (%s)\n",recvlen,remains,len,ipaddr);
//printf("got %d remains.%d of total.%d from (%s)\n",recvlen,remains,len,ipaddr);
recvbuf = &recvbuf[recvlen];
} else usleep(10000);
}

Loading…
Cancel
Save