diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index c361dd528..09534dc89 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -38,7 +38,7 @@ char *LP_isitme(char *destip,uint16_t destport) { if ( LP_mypeer != 0 && strcmp(destip,LP_mypeer->ipaddr) == 0 && LP_mypeer->port == destport ) { - printf("no need to notify ourselves\n"); + //printf("no need to notify ourselves\n"); return(clonestr("{\"result\":\"success\"}")); } else return(0); } @@ -68,7 +68,10 @@ char *issue_LP_notify(char *destip,uint16_t destport,char *ipaddr,uint16_t port, { char url[512],*retstr; if ( (retstr= LP_isitme(destip,destport)) != 0 ) - return(retstr); + { + free(retstr); + return(0); + } sprintf(url,"http://%s:%u/api/stats/notify?ipaddr=%s&port=%u&profit=%.6f&numpeers=%d&numutxos=%d",destip,destport,ipaddr,port,profitmargin,numpeers,numutxos); return(issue_curlt(url,LP_HTTP_TIMEOUT)); } @@ -77,11 +80,9 @@ char *issue_LP_notifyutxo(char *destip,uint16_t destport,struct LP_utxoinfo *utx { char url[4096],str[65],str2[65],str3[65],*retstr; struct _LP_utxoinfo u; uint64_t val,val2; if ( (retstr= LP_isitme(destip,destport)) != 0 ) - return(retstr); - if ( LP_mypeer != 0 && strcmp(destip,LP_mypeer->ipaddr) == 0 && LP_mypeer->port == destport ) { - //printf("no need to notify ourselves\n"); - return(0);//clonestr("{\"result\":\"success\"}")); + free(retstr); + return(0); } u = (utxo->iambob != 0) ? utxo->deposit : utxo->fee; if ( LP_iseligible(&val,&val2,utxo->iambob,utxo->coin,utxo->payment.txid,utxo->payment.vout,utxo->S.satoshis,u.txid,u.vout,utxo->pubkey) > 0 )