From c0a2160cb73acbc3f3b2bc2103eaaa07a2fc15e3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 26 Oct 2017 18:57:15 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_stats.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/iguana/exchanges/LP_stats.c b/iguana/exchanges/LP_stats.c index d2a22f0a3..c29c6fa45 100644 --- a/iguana/exchanges/LP_stats.c +++ b/iguana/exchanges/LP_stats.c @@ -136,7 +136,23 @@ int32_t LP_statslog_parsequote(char *method,cJSON *lineobj) memset(basevols,0,sizeof(basevols)); memset(relvols,0,sizeof(relvols)); memset(&Q,0,sizeof(Q)); - if ( strcmp(method,"tradestatus") != 0 && LP_quoteparse(&Q,lineobj) < 0 ) + for (i=methodind=0; imethodind = methodind; + LP_swapstats_update(sp,&Q,lineobj); + } else printf("unexpected tradestatus.(%s)\n",jprint(lineobj,0)); + return(0); + } + if ( LP_quoteparse(&Q,lineobj) < 0 ) { printf("quoteparse_error.(%s)\n",jprint(lineobj,0)); LP_parse_errors++; @@ -144,12 +160,6 @@ int32_t LP_statslog_parsequote(char *method,cJSON *lineobj) } else { - for (i=methodind=0; i sp->methodind || strcmp(method,"tradestatus") == 0 ) + if ( methodind > sp->methodind ) { sp->methodind = methodind; LP_swapstats_update(sp,&Q,lineobj);