Browse Source

Test

etomic
jl777 8 years ago
parent
commit
92188ecaf5
  1. 8
      iguana/exchanges/LP_forwarding.c

8
iguana/exchanges/LP_forwarding.c

@ -103,12 +103,12 @@ int32_t LP_pushsock_create(struct LP_forwardinfo *ptr,char *pushaddr)
return(pushsock);
}
char *LP_register(bits256 pubkey,char *ipaddr)
char *LP_register(bits256 pubkey,char *ip_port)
{
struct LP_forwardinfo *ptr=0; int32_t pushsock; char pushaddr[64];
if ( ipaddr == 0 || ipaddr[0] == 0 || is_ipaddr(ipaddr) == 0 || bits256_nonz(pubkey) == 0 )
return(clonestr("{\"error\":\"illegal ipaddr or null pubkey\"}"));
sprintf(pushaddr,"ws://%s:%u",ipaddr,7780);
if ( ip_port == 0 || ip_port[0] == 0 || is_ipaddr(ip_port) == 0 || bits256_nonz(pubkey) == 0 )
return(clonestr("{\"error\":\"illegal ip_port or null pubkey\"}"));
sprintf(pushaddr,"ws://%s",ip_port);
char str[65]; printf("register.(%s) %s\n",pushaddr,bits256_str(str,pubkey));
if ( (ptr= LP_forwardfind(pubkey)) != 0 )
{

Loading…
Cancel
Save