Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
943b528c56
  1. 2
      basilisk/basilisk.c
  2. 2
      iguana/iguana_accept.c

2
basilisk/basilisk.c

@ -328,7 +328,7 @@ char *basilisk_hexmsg(struct supernet_info *myinfo,struct category_info *cat,voi
{ {
if ( addr->supernet != 0 && strcmp(addr->ipaddr,remoteaddr) == 0 ) if ( addr->supernet != 0 && strcmp(addr->ipaddr,remoteaddr) == 0 )
{ {
printf("send back basilisk_result addr->supernet.%u to (%s)\n",addr->supernet,addr->ipaddr); printf("send back basilisk_result addr->supernet.%u to (%s).%d\n",addr->supernet,addr->ipaddr,addr->A.port);
iguana_send_supernet(addr,retstr,0); iguana_send_supernet(addr,retstr,0);
free_json(json); free_json(json);
return(retstr); return(retstr);

2
iguana/iguana_accept.c

@ -96,6 +96,7 @@ void iguana_acceptloop(void *args)
} }
memcpy(&ipbits,&cli_addr.sin_addr.s_addr,sizeof(ipbits)); memcpy(&ipbits,&cli_addr.sin_addr.s_addr,sizeof(ipbits));
expand_ipbits(ipaddr,ipbits); expand_ipbits(ipaddr,ipbits);
printf("incoming (%s:%u)\n",ipaddr,cli_addr.sin_port);
for (i=flag=0; i<IGUANA_MAXPEERS; i++) for (i=flag=0; i<IGUANA_MAXPEERS; i++)
{ {
if ( coin->peers.active[i].ipbits == (uint32_t)ipbits && coin->peers.active[i].usock >= 0 ) if ( coin->peers.active[i].ipbits == (uint32_t)ipbits && coin->peers.active[i].usock >= 0 )
@ -104,6 +105,7 @@ void iguana_acceptloop(void *args)
close(coin->peers.active[i].usock); close(coin->peers.active[i].usock);
coin->peers.active[i].dead = 0; coin->peers.active[i].dead = 0;
coin->peers.active[i].usock = sock; coin->peers.active[i].usock = sock;
coin->peers.active[i].A.port = cli_addr.sin_port;
coin->peers.active[i].ready = (uint32_t)time(NULL); coin->peers.active[i].ready = (uint32_t)time(NULL);
flag = 1; flag = 1;
instantdex_peerhas_clear(coin,&coin->peers.active[i]); instantdex_peerhas_clear(coin,&coin->peers.active[i]);

Loading…
Cancel
Save