Browse Source

Test

etomic
jl777 7 years ago
parent
commit
83bb9a061b
  1. 2
      iguana/exchanges/LP_commands.c
  2. 14
      iguana/exchanges/LP_nativeDEX.c

2
iguana/exchanges/LP_commands.c

@ -542,7 +542,7 @@ bot_resume(botid)\n\
return(LP_postprice_recv(argjson));
else if ( strcmp(method,"postutxos") == 0 )
return(LP_postutxos_recv(argjson));
else if ( strcmp(method,"uitem") == 0 )
else if ( 0 && strcmp(method,"uitem") == 0 )
return(LP_uitem_recv(argjson));
else if ( strcmp(method,"notify") == 0 )
return(LP_notify_recv(argjson));

14
iguana/exchanges/LP_nativeDEX.c

@ -327,7 +327,7 @@ char *LP_process_message(void *ctx,char *typestr,char *myipaddr,int32_t pubsock,
int32_t LP_sock_check(char *typestr,void *ctx,char *myipaddr,int32_t pubsock,int32_t sock,char *remoteaddr,int32_t maxdepth)
{
int32_t recvlen=1,nonz = 0; cJSON *argjson; void *ptr,*buf; char methodstr[64],*retstr,*str; struct nn_pollfd pfd;
int32_t recvlen=1,nonz = 0; cJSON *argjson; void *ptr; char methodstr[64],*retstr,*str; struct nn_pollfd pfd;
if ( sock >= 0 )
{
while ( nonz < maxdepth && recvlen > 0 )
@ -339,11 +339,11 @@ int32_t LP_sock_check(char *typestr,void *ctx,char *myipaddr,int32_t pubsock,int
if ( nn_poll(&pfd,1,1) != 1 )
break;
ptr = 0;
buf = malloc(1000000);
if ( (recvlen= nn_recv(sock,buf,1000000,0)) > 0 )
//if ( (recvlen= nn_recv(sock,&ptr,NN_MSG,0)) > 0 )
//buf = malloc(1000000);
//if ( (recvlen= nn_recv(sock,buf,1000000,0)) > 0 )
if ( (recvlen= nn_recv(sock,&ptr,NN_MSG,0)) > 0 )
{
ptr = buf;
//ptr = buf;
methodstr[0] = 0;
//printf("%s.(%s)\n",typestr,(char *)ptr);
if ( 0 )
@ -394,8 +394,8 @@ int32_t LP_sock_check(char *typestr,void *ctx,char *myipaddr,int32_t pubsock,int
}
if ( ptr != 0 )
{
//nn_freemsg(ptr), ptr = 0;
free(buf);
nn_freemsg(ptr), ptr = 0;
//free(buf);
}
}
}

Loading…
Cancel
Save