From 9abf21acbbc206339ce7f3e004c65d07c1632ccc Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Feb 2018 20:37:01 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 2 +- iguana/exchanges/stats.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index e5ca733bc..7a08c0e8b 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -199,7 +199,7 @@ char *LP_command_process(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson return(0); if ( stats_JSONonly != 0 || LP_tradecommand(ctx,myipaddr,pubsock,argjson,data,datalen) <= 0 ) { - if ( (retstr= stats_JSON(ctx,myipaddr,pubsock,argjson,"127.0.0.1",0)) != 0 ) + if ( (retstr= stats_JSON(ctx,myipaddr,pubsock,argjson,"127.0.0.1",stats_JSONonly)) != 0 ) { //printf("%s PULL.[%d]-> (%s)\n",myipaddr != 0 ? myipaddr : "127.0.0.1",datalen,retstr); //if ( pubsock >= 0 ) //strncmp("{\"error\":",retstr,strlen("{\"error\":")) != 0 && diff --git a/iguana/exchanges/stats.c b/iguana/exchanges/stats.c index c65620977..896ad3709 100644 --- a/iguana/exchanges/stats.c +++ b/iguana/exchanges/stats.c @@ -575,8 +575,7 @@ char *stats_rpcparse(char *retbuf,int32_t bufsize,int32_t *jsonflagp,int32_t *po while ( retstr == 0 ) usleep(10000); //retstr = stats_JSON(ctx,myipaddr,-1,arg,remoteaddr,port); - } - else retstr = clonestr("{\"error\":\"invalid remote method\"}"); + } else retstr = clonestr("{\"error\":\"invalid remote method\"}"); #else buf = jprint(arg,0); LP_queuecommand(&retstr,buf,-1,1); @@ -591,7 +590,7 @@ char *stats_rpcparse(char *retbuf,int32_t bufsize,int32_t *jsonflagp,int32_t *po free_json(json); if ( tmpjson != 0 ) free(tmpjson); - //printf("stats_JSON rpc return.(%s)\n",retstr); +printf("stats_JSON rpc return.(%s)\n",retstr); return(retstr); } free_json(argjson);