Browse Source

Test

etomic
jl777 8 years ago
parent
commit
c5f600267f
  1. 8
      iguana/exchanges/LP_commands.c
  2. 1
      iguana/exchanges/LP_rpc.c

8
iguana/exchanges/LP_commands.c

@ -239,7 +239,15 @@ forwardhex(pubkey,hex)\n\
else if ( strcmp(method,"forwardhex") == 0 )
retstr = LP_forwardhex(pubsock,jbits256(argjson,"pubkey"),jstr(argjson,"hex"));
else if ( strcmp(method,"psock") == 0 )
{
if ( myipaddr == 0 || myipaddr[0] == 0 || strcmp(myipaddr,"127.0.0.1") == 0 )
{
if ( LP_mypeer != 0 )
myipaddr = LP_mypeer->ipaddr;
else printf("LP_psock dont have actual ipaddr?\n");
}
return(LP_psock(myipaddr,jint(argjson,"ispaired")));
}
else if ( strcmp(method,"notify") == 0 )
retstr = clonestr("{\"result\":\"success\",\"notify\":\"received\"}");
}

1
iguana/exchanges/LP_rpc.c

@ -132,6 +132,7 @@ uint16_t LP_psock_get(char *connectaddr,char *publicaddr,int32_t ispaired)
{
if ( (retstr= issue_LP_psock(peer->ipaddr,peer->port,ispaired)) != 0 )
{
printf("got.(%s)\n",retstr);
if ( (retjson= cJSON_Parse(retstr)) != 0 )
{
if ( (addr= jstr(retjson,"publicaddr")) != 0 )

Loading…
Cancel
Save