Browse Source

test

release/v0.1
jl777 8 years ago
committed by Christopher Valerio
parent
commit
afe99f206a
  1. 5
      basilisk/basilisk.c

5
basilisk/basilisk.c

@ -174,7 +174,6 @@ int32_t basilisk_sendcmd(struct supernet_info *myinfo,char *destipaddr,char *typ
return(0);
}
}
printf("basilisk send -> (%s)\n",destipaddr);
iguana_rwnum(1,&data[-(int32_t)sizeof(*basilisktagp)],sizeof(*basilisktagp),basilisktagp);
if ( *basilisktagp == 0 )
{
@ -186,18 +185,20 @@ int32_t basilisk_sendcmd(struct supernet_info *myinfo,char *destipaddr,char *typ
data -= sizeof(*basilisktagp), datalen += sizeof(*basilisktagp);
memset(cmd,0,sizeof(cmd));
sprintf(cmd,"SuperNET%s",type);
printf("basilisk send -> (%s)\n",destipaddr);
if ( destipaddr != 0 )
{
cmd[6] = 'E', cmd[7] = 'T';
HASH_ITER(hh,myinfo->allcoins,coin,tmp)
{
printf("basilisk iter.(%s) -> (%s)\n",coin->symbol,destipaddr);
if ( coin->peers == 0 )
continue;
if ( (addr= iguana_peerslot(coin,calc_ipbits(destipaddr),0)) != 0 )
{
printf("RET [%d] to %s\n",datalen,addr->ipaddr);
return(iguana_queue_send(addr,delaymillis,&data[-(int32_t)sizeof(struct iguana_msghdr)],cmd,datalen));
}
} else printf("cant find (%s) in (%s)\n",addr->ipaddr,coin->symbol);
}
printf("cant find (%s) to RET to\n",addr->ipaddr);
return(-1);

Loading…
Cancel
Save