jl777 8 years ago
parent
commit
65d2e5c9b2
  1. 2
      iguana/exchanges/LP_commands.c
  2. 4
      iguana/exchanges/LP_nativeDEX.c
  3. 2
      iguana/exchanges/LP_ordermatch.c

2
iguana/exchanges/LP_commands.c

@ -443,7 +443,7 @@ dividends(coin, height, <args>)\n\
if ( strcmp("connect",method) == 0 ) if ( strcmp("connect",method) == 0 )
printf("broadcast.(%s)\n",jprint(reqjson,0)); printf("broadcast.(%s)\n",jprint(reqjson,0));
msg = jprint(reqjson,0); msg = jprint(reqjson,0);
_LP_send(pubsock,msg,(int32_t)strlen(msg)+1,0); //_LP_send(pubsock,msg,(int32_t)strlen(msg)+1,0);
LP_broadcast_message(LP_mypubsock,base!=0?base:jstr(argjson,"coin"),rel,zero,msg); LP_broadcast_message(LP_mypubsock,base!=0?base:jstr(argjson,"coin"),rel,zero,msg);
} }
retstr = clonestr("{\"result\":\"success\"}"); retstr = clonestr("{\"result\":\"success\"}");

4
iguana/exchanges/LP_nativeDEX.c

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

2
iguana/exchanges/LP_ordermatch.c

@ -766,7 +766,7 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,
{ {
bits256 zero; bits256 zero;
memset(&zero,0,sizeof(zero)); memset(&zero,0,sizeof(zero));
_LP_send(pubsock,msg,(int32_t)strlen(msg)+1,0); //_LP_send(pubsock,msg,(int32_t)strlen(msg)+1,0);
LP_broadcast_message(pubsock,Q.srccoin,Q.destcoin,zero,msg); //butxo->S.otherpubkey LP_broadcast_message(pubsock,Q.srccoin,Q.destcoin,zero,msg); //butxo->S.otherpubkey
} }
butxo->T.lasttime = (uint32_t)time(NULL); butxo->T.lasttime = (uint32_t)time(NULL);

Loading…
Cancel
Save