From 4ede8a0893a3803a18ff42e535814b85a106c9d5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 23 Jun 2018 23:46:30 -1100 Subject: [PATCH] Fix --- iguana/exchanges/LP_nativeDEX.c | 2 +- iguana/exchanges/LP_ordermatch.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 2bd4547c2..bde3532cc 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1110,7 +1110,7 @@ void LP_swapsloop(void *ctx) sleep(6); } } - LP_gtc_iteration(); + LP_gtc_iteration(ctx,LP_myipaddr,LP_mypubsock); } } diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 99ee259c6..a5f9d961d 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -576,7 +576,7 @@ int32_t LP_connectstartbob(void *ctx,int32_t pubsock,char *base,char *rel,double return(retval); } -void LP_gtc_iteration() +void LP_gtc_iteration(void *ctx,char *myipaddr,int32_t mypubsock) { struct LP_gtcorder *gtc,*tmp; struct LP_quoteinfo *qp; uint64_t destvalue,destvalue2; if ( Alice_expiration != 0 ) @@ -686,7 +686,7 @@ char *LP_cancel_order(char *uuidstr) struct LP_gtcorder *gtc,*tmp; DL_FOREACH_SAFE(GTCorders,gtc,tmp) { - if ( strcmp(gtc->uuidstr,uuidstr) == 0 ) + if ( strcmp(gtc->Q.uuidstr,uuidstr) == 0 ) { retjson = cJSON_CreateObject(); jaddstr(retjson,"result","success"); @@ -696,12 +696,12 @@ char *LP_cancel_order(char *uuidstr) { gtc->cancelled = (uint32_t)time(NULL); jaddstr(retjson,"status","uuid canceled"); - LP_failedmsg(gtc->Q.R.requestid,gtc->Q.R.quoteid,-9997,gtc->uuidstr); + LP_failedmsg(gtc->Q.R.requestid,gtc->Q.R.quoteid,-9997,qp->uuidstr); } else { jaddstr(retjson,"status","uuid already canceled"); - LP_failedmsg(gtc->Q.R.requestid,gtc->Q.R.quoteid,-9996,gtc->uuidstr); + LP_failedmsg(gtc->Q.R.requestid,gtc->Q.R.quoteid,-9996,qp->uuidstr); } } }