From 9fcb13501e717f4fe8f9b3eb3a66c08e903d8c24 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 25 Oct 2017 17:32:33 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_commands.c | 8 ++++---- iguana/exchanges/LP_nativeDEX.c | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index f2c641d94..32c84a180 100644 --- a/iguana/exchanges/LP_commands.c +++ b/iguana/exchanges/LP_commands.c @@ -450,13 +450,13 @@ stop()\n\ } // received response if ( strcmp(method,"postprice") == 0 ) - retstr = LP_postprice_recv(argjson); + return(LP_postprice_recv(argjson)); else if ( strcmp(method,"postutxos") == 0 ) - retstr = LP_postutxos_recv(argjson); + return(LP_postutxos_recv(argjson)); else if ( strcmp(method,"uitem") == 0 ) - retstr = LP_uitem_recv(argjson); + return(LP_uitem_recv(argjson)); else if ( strcmp(method,"notify") == 0 ) - retstr = LP_notify_recv(argjson); + return(LP_notify_recv(argjson)); // end received response // public access, even from http diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 657235bb3..157979314 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -794,6 +794,7 @@ void LP_reserved_msgs(void *ignore) int32_t LP_reserved_msg(char *base,char *rel,bits256 pubkey,char *msg) { int32_t n = 0; +#ifndef FROM_JS portable_mutex_lock(&LP_reservedmutex); if ( num_Reserved_msgs < sizeof(Reserved_msgs)/sizeof(*Reserved_msgs) ) { @@ -801,6 +802,9 @@ int32_t LP_reserved_msg(char *base,char *rel,bits256 pubkey,char *msg) n = num_Reserved_msgs; } else LP_broadcast_message(LP_mypubsock,base,rel,pubkey,msg); portable_mutex_unlock(&LP_reservedmutex); +#else + LP_broadcast_message(LP_mypubsock,base,rel,pubkey,msg); +#endif if ( num_Reserved_msgs > max_Reserved_msgs ) { max_Reserved_msgs = num_Reserved_msgs; @@ -1046,7 +1050,6 @@ void LP_fromjs_iter() printf("LP_fromjs_iter got called LP_counter.%d userpass.(%s) ctx.%p\n",LP_counter,G.USERPASS,ctx); LP_pubkeys_query(); LP_utxosQ_process(); - LP_reserved_msgs(0); LP_nanomsg_recvs(ctx); LP_mainloop_iter(ctx,LP_myipaddr,0,LP_mypubsock,LP_publicaddr,LP_RPCPORT); LP_counter++;