Browse Source

Test

etomic
jl777 8 years ago
parent
commit
fb4179c174
  1. 4
      iguana/exchanges/LP_peers.c
  2. 6
      iguana/exchanges/LP_rpc.c

4
iguana/exchanges/LP_peers.c

@ -71,7 +71,9 @@ struct LP_peerinfo *LP_addpeer(struct LP_peerinfo *mypeer,int32_t mypubsock,char
{
printf("LPaddpeer %s\n",ipaddr);
peer = calloc(1,sizeof(*peer));
peer->sessionid = sessionid;
if ( strcmp(peer->ipaddr,LP_myipaddr) == 0 )
peer->sessionid = LP_sessionid;
else peer->sessionid = sessionid;
peer->pushsock = peer->subsock = pushsock = subsock = -1;
strcpy(peer->ipaddr,ipaddr);
if ( pushport != 0 && subport != 0 && (pushsock= nn_socket(AF_SP,NN_PUSH)) >= 0 )

6
iguana/exchanges/LP_rpc.c

@ -50,9 +50,11 @@ char *LP_isitme(char *destip,uint16_t destport)
char *issue_LP_getpeers(char *destip,uint16_t destport,char *ipaddr,uint16_t port,int32_t numpeers,int32_t numutxos)
{
char url[512];
char url[512],*retstr;
sprintf(url,"http://%s:%u/api/stats/getpeers?ipaddr=%s&port=%u&numpeers=%d&numutxos=%d",destip,destport,ipaddr,port,numpeers,numutxos);
return(LP_issue_curl("getpeers",destip,port,url));
retstr = LP_issue_curl("getpeers",destip,port,url);
printf("getpeers.(%s)\n",retstr);
return(retstr);
}
char *issue_LP_getutxos(char *destip,uint16_t destport,char *coin,int32_t lastn,char *ipaddr,uint16_t port,int32_t numpeers,int32_t numutxos)

Loading…
Cancel
Save