|
|
@ -101,7 +101,7 @@ void LP_process_message(char *typestr,char *myipaddr,int32_t pubsock,double prof |
|
|
|
decode_hex((void *)jsonstr,datalen,(char *)ptr); |
|
|
|
jsonstr[datalen] = 0; |
|
|
|
} else jsonstr = (char *)ptr; |
|
|
|
if ( 0 && IAMLP == 0 ) |
|
|
|
if ( 1 && IAMLP == 0 ) |
|
|
|
printf("%s %d, datalen.%d (%s)\n",typestr,recvlen,datalen,jsonstr); |
|
|
|
if ( (argjson= cJSON_Parse(jsonstr)) != 0 ) |
|
|
|
{ |
|
|
@ -139,7 +139,8 @@ int32_t LP_pullsock_check(char *myipaddr,int32_t pubsock,int32_t pullsock,double |
|
|
|
while ( pullsock >= 0 && (recvlen= nn_recv(pullsock,&ptr,NN_MSG,NN_DONTWAIT)) >= 0 ) |
|
|
|
{ |
|
|
|
nonz++; |
|
|
|
LP_process_message("PULL",myipaddr,pubsock,profitmargin,ptr,recvlen); |
|
|
|
//LP_process_message("PULL",myipaddr,pubsock,profitmargin,ptr,recvlen);
|
|
|
|
LP_process_message("PULL",myipaddr,pullsock,profitmargin,ptr,recvlen); |
|
|
|
} |
|
|
|
return(nonz); |
|
|
|
} |
|
|
|