From b21d7e5ffcebf5e07a15b7067a49d67cbd488687 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Jun 2017 08:12:20 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_forwarding.c | 5 +++-- iguana/exchanges/LP_rpc.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_forwarding.c b/iguana/exchanges/LP_forwarding.c index a53f0f6ed..19979838e 100644 --- a/iguana/exchanges/LP_forwarding.c +++ b/iguana/exchanges/LP_forwarding.c @@ -53,8 +53,9 @@ char *LP_register(bits256 pubkey,char *pushaddr) struct LP_forwardinfo *ptr=0; int32_t pushsock; if ( pushaddr == 0 || pushaddr[0] == 0 || bits256_nonz(pubkey) == 0 ) return(clonestr("{\"error\":\"illegal ipaddr or null pubkey\"}")); - if ( strlen(pushaddr) <= strlen("tcp://") || is_ipaddr(pushaddr+strlen("tcp://")) == 0 ) - return(clonestr("{\"error\":\"illegal ipaddr\"}")); + //if ( strlen(pushaddr) <= strlen("tcp://") || is_ipaddr(pushaddr+strlen("tcp://")) == 0 ) + // return(clonestr("{\"error\":\"illegal ipaddr\"}")); + char str[65]; printf("register.(%s) %s\n",pushaddr,bits256_str(str,pubkey)); if ( (ptr= LP_forwardfind(pubkey)) != 0 ) { ptr->lasttime = (uint32_t)time(NULL); diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index 6724dac27..cbc253e2b 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -63,7 +63,7 @@ char *issue_LP_register(char *destip,uint16_t destport,bits256 pubkey,char *push char url[512],str[65]; if ( strncmp("tcp://",pushaddr,strlen("tcp://")) != 0 || strlen(pushaddr) <= strlen("tcp://") ) return(clonestr("{\"error\":\"illegal pushaddr\"}")); - sprintf(url,"http://%s:%u/api/stats/register?pubkey=%s&pushaddr=%s",destip,destport,bits256_str(str,pubkey),pushaddr); + sprintf(url,"http://%s:%u/api/stats/register?pubkey=%s&pushaddr=%s",destip,destport,bits256_str(str,pubkey),pushaddr+strlen("tcp://")); //printf("getutxo.(%s)\n",url); return(issue_curl(url)); }