Browse Source

Test

etomic
jl777 7 years ago
parent
commit
87f229486e
  1. 17
      iguana/exchanges/LP_ordermatch.c

17
iguana/exchanges/LP_ordermatch.c

@ -1048,10 +1048,9 @@ void LP_tradesloop(void *ctx)
while ( 1 )
{
LP_millistats_update(&LP_tradesloop_stats);
nonz = 0;
DL_FOREACH_SAFE(LP_tradesQ,qtp,tmp)
{
nonz = 0;
printf("dequeued %p\n",qtp);
now = (uint32_t)time(NULL);
Q = qtp->Q;
funcid = qtp->funcid;
@ -1171,8 +1170,6 @@ void LP_tradecommandQ(struct LP_quoteinfo *qp,char *pairstr,int32_t funcid)
iambob = 1;
else iambob = 0;
aliceid = qp->aliceid;
if ( funcid == LP_REQUEST || funcid == LP_RESERVED )
{
portable_mutex_lock(&LP_tradesmutex);
qtp = calloc(1,sizeof(*qtp));
qtp->funcid = funcid;
@ -1184,18 +1181,6 @@ void LP_tradecommandQ(struct LP_quoteinfo *qp,char *pairstr,int32_t funcid)
safecopy(qtp->pairstr,pairstr,sizeof(qtp->pairstr));
DL_APPEND(LP_tradesQ,qtp);
portable_mutex_unlock(&LP_tradesmutex);
printf("queued %p\n",qtp);
}
/* }
else if ( tp->iambob == iambob )
{
tp->Q = *qp;
tp->newfuncid = funcid;
printf("received newfuncid.%d\n",funcid);
tp->newtime = (uint32_t)time(NULL);
if ( pairstr != 0 )
safecopy(tp->pairstr,pairstr,sizeof(tp->pairstr));
}*/
}
int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,uint8_t *data,int32_t datalen)

Loading…
Cancel
Save