jl777 7 years ago
parent
commit
cb7dee4e2f
  1. 2
      iguana/exchanges/LP_commands.c
  2. 6
      iguana/exchanges/stats.c

2
iguana/exchanges/LP_commands.c

@ -38,7 +38,7 @@ char *stats_JSON(void *ctx,int32_t fastflag,char *myipaddr,int32_t pubsock,cJSON
method = jstr(argjson,"method"); method = jstr(argjson,"method");
if ( method != 0 && (strcmp(method,"addr_unspents") == 0 || strcmp(method,"uitem") == 0 || strcmp(method,"postutxos") == 0) ) if ( method != 0 && (strcmp(method,"addr_unspents") == 0 || strcmp(method,"uitem") == 0 || strcmp(method,"postutxos") == 0) )
return(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 ( (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 ) if ( strcmp(ipaddr,"127.0.0.1") != 0 && argport >= 1000 )

6
iguana/exchanges/stats.c

@ -564,7 +564,7 @@ char *stats_rpcparse(char *retbuf,int32_t bufsize,int32_t *jsonflagp,int32_t *po
if ( is_cJSON_Array(arg) != 0 && cJSON_GetArraySize(arg) == 1 ) if ( is_cJSON_Array(arg) != 0 && cJSON_GetArraySize(arg) == 1 )
arg = jitem(arg,0); arg = jitem(arg,0);
} else arg = argjson; } else arg = argjson;
printf("ARGJSON.(%s)\n",jprint(arg,0)); //printf("ARGJSON.(%s)\n",jprint(arg,0));
if ( userpass != 0 && jstr(arg,"userpass") == 0 ) if ( userpass != 0 && jstr(arg,"userpass") == 0 )
jaddstr(arg,"userpass",userpass); jaddstr(arg,"userpass",userpass);
#ifdef FROM_MARKETMAKER #ifdef FROM_MARKETMAKER
@ -573,7 +573,7 @@ char *stats_rpcparse(char *retbuf,int32_t bufsize,int32_t *jsonflagp,int32_t *po
if ( IPC_ENDPOINT >= 0 && (queueid= juint(arg,"queueid")) > 0 ) if ( IPC_ENDPOINT >= 0 && (queueid= juint(arg,"queueid")) > 0 )
{ {
buf = jprint(arg,0); buf = jprint(arg,0);
printf("Q command\n"); //printf("Q command\n");
LP_queuecommand(&retstr,buf,IPC_ENDPOINT,1,queueid); LP_queuecommand(&retstr,buf,IPC_ENDPOINT,1,queueid);
free(buf); free(buf);
retstr = clonestr("{\"result\":\"success\",\"status\":\"queued\"}"); retstr = clonestr("{\"result\":\"success\",\"status\":\"queued\"}");
@ -855,7 +855,7 @@ void stats_rpcloop(void *args)
continue; continue;
} }
req = calloc(1,sizeof(*req)); req = calloc(1,sizeof(*req));
printf("LP_rpc_processreq req.%p\n",req); //printf("LP_rpc_processreq req.%p\n",req);
req->sock = sock; req->sock = sock;
req->ipbits = ipbits; req->ipbits = ipbits;
req->port = port; req->port = port;

Loading…
Cancel
Save