Browse Source

Test

etomic
jl777 7 years ago
parent
commit
c22c69d70d
  1. 2
      iguana/exchanges/LP_commands.c
  2. 8
      iguana/exchanges/stats.c

2
iguana/exchanges/LP_commands.c

@ -38,7 +38,7 @@ char *stats_JSON(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,char *r
method = jstr(argjson,"method");
if ( method != 0 && (strcmp(method,"addr_unspents") == 0 || strcmp(method,"uitem") == 0 || strcmp(method,"postutxos") == 0) )
return(0);
printf("stats_JSON.(%s)\n",jprint(argjson,0));
//printf("stats_JSON.(%s)\n",jprint(argjson,0));
/*if ( (ipaddr= jstr(argjson,"ipaddr")) != 0 && (argport= juint(argjson,"port")) != 0 && (method == 0 || strcmp(method,"electrum") != 0) )
{
if ( strcmp(ipaddr,"127.0.0.1") != 0 && argport >= 1000 )

8
iguana/exchanges/stats.c

@ -338,7 +338,7 @@ char *stats_rpcparse(char *retbuf,int32_t bufsize,int32_t *jsonflagp,int32_t *po
n = i;
//printf("URLMETHOD.(%s)\n",urlmethod);
*postflagp = (strcmp(urlmethod,"POST") == 0);
printf("POST.%d rpcparse.(%s)\n",*postflagp,urlstr);
//printf("POST.%d rpcparse.(%s)\n",*postflagp,urlstr);
for (i=0; i<sizeof(url)-1&&urlstr[n+i]!=0&&urlstr[n+i]!=' '; i++)
url[i] = urlstr[n+i];
url[i++] = 0;
@ -416,7 +416,7 @@ char *stats_rpcparse(char *retbuf,int32_t bufsize,int32_t *jsonflagp,int32_t *po
{
free_json(argjson);
argjson = cJSON_Parse(data);
printf("data.(%s)\n",data);
//printf("data.(%s)\n",data);
}
if ( argjson != 0 )
{
@ -577,8 +577,8 @@ char *stats_rpcparse(char *retbuf,int32_t bufsize,int32_t *jsonflagp,int32_t *po
int32_t iguana_getcontentlen(char *buf,int32_t recvlen)
{
char *str,*clenstr = "Content-Length: "; int32_t len = -1;
if ( (str= strstr(buf,clenstr)) != 0 )
char *str,*clenstr = "Content-Length: ",*clenstr2 = "content-length: "; int32_t len = -1;
if ( (str= strstr(buf,clenstr)) != 0 || (str= strstr(buf,clenstr2)) != 0 )
{
//printf("strstr.(%s)\n",str);
str += strlen(clenstr);

Loading…
Cancel
Save