Browse Source

Test

etomic
jl777 7 years ago
parent
commit
9813ff2a59
  1. 2
      iguana/exchanges/LP_prices.c
  2. 4
      iguana/exchanges/LP_socket.c

2
iguana/exchanges/LP_prices.c

@ -111,7 +111,7 @@ void LP_address_monitor(struct LP_pubkeyinfo *pubp)
{ {
if ( (retjson= electrum_address_subscribe(coin->symbol,coin->electrum,&retjson,coinaddr)) != 0 ) if ( (retjson= electrum_address_subscribe(coin->symbol,coin->electrum,&retjson,coinaddr)) != 0 )
{ {
printf("%s MONITOR.(%s)\n",coin->symbol,coinaddr); printf("%s MONITOR.(%s) -> %s\n",coin->symbol,coinaddr,jprint(retjson,0));
free_json(retjson); free_json(retjson);
} }
} }

4
iguana/exchanges/LP_socket.c

@ -522,7 +522,7 @@ int32_t LP_recvfunc(struct electrum_info *ep,char *str,int32_t len)
if ( (strjson= cJSON_Parse(str)) != 0 ) if ( (strjson= cJSON_Parse(str)) != 0 )
{ {
resultjson = jobj(strjson,"result"); resultjson = jobj(strjson,"result");
//printf("result.(%s)\n",jprint(resultjson,0)); printf("result.(%s)\n",jprint(resultjson,0));
if ( (method= jstr(strjson,"method")) != 0 ) if ( (method= jstr(strjson,"method")) != 0 )
{ {
if ( strcmp(method,"blockchain.headers.subscribe") == 0 ) if ( strcmp(method,"blockchain.headers.subscribe") == 0 )
@ -553,8 +553,8 @@ int32_t LP_recvfunc(struct electrum_info *ep,char *str,int32_t len)
stritem = (struct stritem *)item; stritem = (struct stritem *)item;
if ( item->type == idnum ) if ( item->type == idnum )
{ {
printf("matched idnum.%d\n",idnum);
DL_DELETE(ep->pendingQ.list,item); DL_DELETE(ep->pendingQ.list,item);
//printf("matched idnum.%d\n",idnum);
*((cJSON **)stritem->retptrp) = strjson; *((cJSON **)stritem->retptrp) = strjson;
strjson = 0; strjson = 0;
free(item); free(item);

Loading…
Cancel
Save