Browse Source

Test

etomic
jl777 8 years ago
parent
commit
c8d2cb7e1f
  1. 13
      iguana/exchanges/LP_nativeDEX.c
  2. 4
      iguana/exchanges/LP_network.c

13
iguana/exchanges/LP_nativeDEX.c

@ -176,19 +176,6 @@ int32_t LP_subsock_check(char *myipaddr,int32_t pubsock,int32_t sock,double prof
nonz++;
if ( (retstr= LP_process_message("SUB",myipaddr,pubsock,profitmargin,ptr,recvlen,sock)) != 0 )
free(retstr);
/*if ( (argjson= cJSON_Parse((char *)ptr)) != 0 )
{
printf("%s SUB.[%d] %s\n",myipaddr,recvsize,jprint(argjson,0));
portable_mutex_lock(&LP_commandmutex);
if ( (retstr= LP_command_process(myipaddr,-1,argjson,0,0,profitmargin)) != 0 )
{
free(retstr);
}
portable_mutex_unlock(&LP_commandmutex);
free_json(argjson);
} else printf("error parsing.(%s)\n",(char *)ptr);
if ( ptr != 0 )
nn_freemsg(ptr), ptr = 0;*/
}
return(nonz);
}

4
iguana/exchanges/LP_network.c

@ -231,7 +231,7 @@ void LP_psockloop(void *_ptr)
portable_mutex_unlock(&LP_psockmutex);
break;
}
else if ( now > ptr->lastping+60 )
else if ( now > ptr->lastping+6 )
{
ptr->lastping = now;
sendsock = ptr->sendsock;
@ -328,7 +328,7 @@ char *LP_psock(char *myipaddr,int32_t ispaired)
jaddstr(retjson,"publicaddr",pushaddr);
jaddnum(retjson,"publicport",pushport);
printf("publicaddr.(%s) for %s\n",pushaddr,subaddr);
while ( 1 )
while ( 0 )
{
printf("LP_Send %d\n",LP_send(pubsock,"hello",0));
sleep(10);

Loading…
Cancel
Save