From b04d15e08f6d08f5cbe86b13c37a6510d02765e4 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 21 Sep 2017 14:54:17 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_commands.c | 3 ++- iguana/exchanges/LP_nativeDEX.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index bb13e0f6d..43c41e08d 100644 --- a/iguana/exchanges/LP_commands.c +++ b/iguana/exchanges/LP_commands.c @@ -439,7 +439,8 @@ dividends(coin, height, )\n\ else { memset(zero.bytes,0,sizeof(zero)); - //printf("broadcast.(%s)\n",jprint(reqjson,0)); + if ( strcmp("connect",method) == 0 ) + printf("broadcast.(%s)\n",jprint(reqjson,0)); LP_broadcast_message(LP_mypubsock,base!=0?base:jstr(argjson,"coin"),rel,zero,jprint(reqjson,0)); } retstr = clonestr("{\"result\":\"success\"}"); diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 05de2d87c..48fdfd9fa 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -288,12 +288,13 @@ int32_t LP_sock_check(char *typestr,void *ctx,char *myipaddr,int32_t pubsock,int Broadcaststr = 0; if ( (argjson= cJSON_Parse(str)) != 0 ) { + if ( jobj(argjson,"method") != 0 && strcmp("connect",jstr(argjson,"method")) == 0 ) + printf("self.(%s)\n",str); if ( LP_tradecommand(ctx,myipaddr,pubsock,argjson,0,0) <= 0 ) { if ( (retstr= stats_JSON(ctx,myipaddr,pubsock,argjson,remoteaddr,0)) != 0 ) free(retstr); } - //LP_tradecommand(ctx,myipaddr,pubsock,argjson,0,0); free_json(argjson); } free(str);