|
|
@ -111,7 +111,7 @@ char *LP_command_process(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson |
|
|
|
//if ( pubsock >= 0 ) //strncmp("{\"error\":",retstr,strlen("{\"error\":")) != 0 &&
|
|
|
|
//LP_send(pubsock,retstr,(int32_t)strlen(retstr)+1,0);
|
|
|
|
} |
|
|
|
} |
|
|
|
} else printf("finished tradecommand (%s)\n",jprint(argjson,0)); |
|
|
|
return(retstr); |
|
|
|
} |
|
|
|
|
|
|
@ -207,7 +207,7 @@ char *LP_process_message(void *ctx,char *typestr,char *myipaddr,int32_t pubsock, |
|
|
|
if ( (retstr= LP_command_process(ctx,myipaddr,pubsock,argjson,&((uint8_t *)ptr)[len],recvlen - len)) != 0 ) |
|
|
|
{ |
|
|
|
} |
|
|
|
if ( jobj(argjson,"method") != 0 && strncmp(jstr(argjson,"method"),"connect",7) == 0 ) |
|
|
|
//if ( jobj(argjson,"method") != 0 && strncmp(jstr(argjson,"method"),"connect",7) == 0 )
|
|
|
|
fprintf(stderr,"finished %s\n",jsonstr); |
|
|
|
free_json(argjson); |
|
|
|
} |
|
|
@ -322,7 +322,7 @@ void command_rpcloop(void *myipaddr) |
|
|
|
{ |
|
|
|
if ( peer->errors >= LP_MAXPEER_ERRORS ) |
|
|
|
{ |
|
|
|
if ( (rand() % 100) == 0 ) |
|
|
|
if ( (rand() % 1000) == 0 ) |
|
|
|
peer->errors--; |
|
|
|
else |
|
|
|
{ |
|
|
|