From b072b80191492b1c6460875a78749df8902c44b7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 10 Nov 2017 07:16:15 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_tradebots.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_tradebots.c b/iguana/exchanges/LP_tradebots.c index 8a0ad850b..710c9367a 100644 --- a/iguana/exchanges/LP_tradebots.c +++ b/iguana/exchanges/LP_tradebots.c @@ -340,7 +340,7 @@ void LP_tradebot_timeslice(void *ctx,struct LP_tradebot *bot) void LP_aliceid(uint32_t tradeid,uint64_t aliceid,char *event,uint32_t requestid,uint32_t quoteid) { - struct LP_tradebot *bot,*tmp; int32_t i; struct LP_tradebot_trade *tp; + struct LP_tradebot *bot,*tmp; int32_t i,matched = 0; struct LP_tradebot_trade *tp; DL_FOREACH_SAFE(LP_tradebots,bot,tmp) { for (i=0; inumtrades; i++) @@ -348,17 +348,22 @@ void LP_aliceid(uint32_t tradeid,uint64_t aliceid,char *event,uint32_t requestid if ( (tp= bot->trades[i]) != 0 && tp->finished == 0 && tp->tradeid == tradeid ) { tp->aliceid = aliceid; - printf("bot event tradeid.%u aliceid.%llu %s r.%u q.%u\n",tradeid,(long long)aliceid,event,requestid,quoteid); + printf("bot event tradeid.%u aliceid.%llu (%s) r.%u q.%u\n",tradeid,(long long)aliceid,event,requestid,quoteid); if ( requestid != 0 && quoteid != 0 ) { tp->requestid = requestid; tp->quoteid = quoteid; } strcpy(tp->event,event); + matched = 0; break; } } + if ( matched != 0 ) + break; } + if ( matched == 0 ) + printf("NO MATCH: bot event tradeid.%u aliceid.%llu (%s) r.%u q.%u\n",tradeid,(long long)aliceid,event,requestid,quoteid); } void LP_tradebot_finished(uint32_t tradeid,uint32_t requestid,uint32_t quoteid)