|
|
@ -106,12 +106,13 @@ char *issue_LP_notifyutxo(char *destip,uint16_t destport,struct LP_utxoinfo *utx |
|
|
|
|
|
|
|
char *issue_LP_register(char *destip,uint16_t destport,bits256 pubkey,char *pushaddr) |
|
|
|
{ |
|
|
|
char url[512],str[65]; |
|
|
|
char url[512],str[65],*retstr; |
|
|
|
if ( strncmp("tcp://",pushaddr,strlen("tcp://")) != 0 || strlen(pushaddr) <= strlen("tcp://") ) |
|
|
|
return(clonestr("{\"error\":\"illegal pushaddr\"}")); |
|
|
|
sprintf(url,"http://%s:%u/api/stats/register?client=%s&pushaddr=%s",destip,destport,bits256_str(str,pubkey),pushaddr+strlen("tcp://")); |
|
|
|
//printf("getutxo.(%s)\n",url);
|
|
|
|
return(issue_curlt(url,LP_HTTP_TIMEOUT)); |
|
|
|
retstr = issue_curlt(url,LP_HTTP_TIMEOUT); |
|
|
|
printf("getutxo.(%s) -> (%s)\n",url,retstr!=0?retstr:""); |
|
|
|
return(retstr); |
|
|
|
} |
|
|
|
|
|
|
|
char *issue_LP_lookup(char *destip,uint16_t destport,bits256 pubkey) |
|
|
|