jl777 7 years ago
parent
commit
a4ce26cba6
  1. 2
      iguana/exchanges/LP_nativeDEX.c
  2. 2
      iguana/exchanges/LP_network.c
  3. 1
      iguana/exchanges/LP_ordermatch.c

2
iguana/exchanges/LP_nativeDEX.c

@ -202,7 +202,7 @@ char *LP_process_message(void *ctx,char *typestr,char *myipaddr,int32_t pubsock,
if ( jsonstr != 0 && argjson != 0 )
{
len = (int32_t)strlen(jsonstr) + 1;
if ( strcmp(method,"postprice") != 0 )
if ( jobj(argjson,"method") && strcmp(method,"postprice") != 0 )
fprintf(stderr,"%s ",jstr(argjson,"method"));
if ( (retstr= LP_command_process(ctx,myipaddr,pubsock,argjson,&((uint8_t *)ptr)[len],recvlen - len)) != 0 )
{

2
iguana/exchanges/LP_network.c

@ -46,7 +46,7 @@ int32_t _LP_send(int32_t sock,void *msg,int32_t sendlen,int32_t freeflag)
}
if ( (sentbytes= nn_send(sock,msg,sendlen,0)) != sendlen )
printf("LP_send sent %d instead of %d\n",sentbytes,sendlen);
//else printf("SENT.(%s)\n",msg);
else printf("SENT.(%s)\n",msg);
if ( freeflag != 0 )
free(msg);
return(sentbytes);

1
iguana/exchanges/LP_ordermatch.c

@ -767,6 +767,7 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,
bits256 zero;
memset(&zero,0,sizeof(zero));
LP_broadcast_message(pubsock,Q.srccoin,Q.destcoin,zero,msg); //butxo->S.otherpubkey
_LP_send(pubsock,msg,(int32_t)strlen(msg)+1,0);
}
butxo->T.lasttime = (uint32_t)time(NULL);
} else printf("warning swappending.%u swap.%p\n",butxo->T.swappending,butxo->S.swap);

Loading…
Cancel
Save