From c25001512e0ea41db35b25db821b100d44769107 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 2 Apr 2018 13:58:28 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_commands.c | 2 +- iguana/exchanges/LP_network.c | 3 ++- iguana/exchanges/stats.c | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index b65fa9556..1345b2431 100644 --- a/iguana/exchanges/LP_commands.c +++ b/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"); 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 ) diff --git a/iguana/exchanges/LP_network.c b/iguana/exchanges/LP_network.c index f5fb75a26..78a6cd8a8 100644 --- a/iguana/exchanges/LP_network.c +++ b/iguana/exchanges/LP_network.c @@ -445,7 +445,7 @@ void LP_commandQ_loop(void *ctx) portable_mutex_unlock(&LP_commandQmutex); if ( ptr->stats_JSONonly < 0 ) // broadcast passthrough { - if ( 1 && ptr->responsesock >= 0 ) + if ( ptr->responsesock >= 0 ) { if ( (result= cJSON_Parse(ptr->msg)) != 0 ) { @@ -461,6 +461,7 @@ void LP_commandQ_loop(void *ctx) } else if ( (argjson= cJSON_Parse(ptr->msg)) != 0 ) { + printf("deQ.(%s)\n",jprint(argjson,0)); if ( (retstr= LP_command_process(ctx,"127.0.0.1",ptr->responsesock,argjson,(uint8_t *)ptr->msg,ptr->msglen,ptr->stats_JSONonly)) != 0 ) { if ( ptr->retstrp != 0 ) diff --git a/iguana/exchanges/stats.c b/iguana/exchanges/stats.c index 7649ea627..d2cc0cab5 100644 --- a/iguana/exchanges/stats.c +++ b/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 ) arg = jitem(arg,0); } else arg = argjson; - //printf("ARGJSON.(%s)\n",jprint(arg,0)); + printf("ARGJSON.(%s)\n",jprint(arg,0)); if ( userpass != 0 && jstr(arg,"userpass") == 0 ) jaddstr(arg,"userpass",userpass); #ifdef FROM_MARKETMAKER @@ -573,6 +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 ) { buf = jprint(arg,0); + printf("Q command\n"); LP_queuecommand(&retstr,buf,IPC_ENDPOINT,1,queueid); free(buf); retstr = clonestr("{\"result\":\"success\",\"status\":\"queued\"}"); @@ -854,7 +855,7 @@ void stats_rpcloop(void *args) continue; } req = calloc(1,sizeof(*req)); - //printf("alloc req.%p\n",req); + printf("LP_rpc_processreq req.%p\n",req); req->sock = sock; req->ipbits = ipbits; req->port = port;