jl777 7 years ago
parent
commit
d04c1257f5
  1. 2
      iguana/exchanges/LP_commands.c
  2. 5
      iguana/exchanges/LP_network.c
  3. 2
      iguana/exchanges/stats.c

2
iguana/exchanges/LP_commands.c

@ -762,7 +762,7 @@ jpg(srcfile, destfile, power2=7, password, data="", required, ind=0)\n\
if ( jint(argjson,"ispaired") != 0 )
{
retstr = LP_psock(&psock,myipaddr,1,jint(argjson,"cmdchannel"));
printf("LP_commands.(%s)\n",retstr);
//printf("LP_commands.(%s)\n",retstr);
return(retstr);
}
else return(clonestr("{\"error\":\"you are running an obsolete version, update\"}"));

5
iguana/exchanges/LP_network.c

@ -647,6 +647,7 @@ char *_LP_psock_create(int32_t *pullsockp,int32_t *pubsockp,char *ipaddr,uint16_
nanomsg_transportname(0,pushaddr,ipaddr,publicport);
nanomsg_transportname(0,subaddr,ipaddr,subport);
LP_psockadd(ispaired,pullsock,publicport,pubsock,subport,subaddr,pushaddr,cmdchannel);
retjson = cJSON_CreateObject();
jaddstr(retjson,"result","success");
jaddstr(retjson,"LPipaddr",ipaddr);
jaddstr(retjson,"connectaddr",subaddr);
@ -674,7 +675,7 @@ char *LP_psock(int32_t *pubsockp,char *ipaddr,int32_t ispaired,int32_t cmdchanne
{
char *retstr=0; uint16_t i,publicport,subport,maxport; int32_t pullsock=-1;
*pubsockp = -1;
printf("LP_psock ipaddr.%s ispaird.%d cmdchannel.%d\n",ipaddr,ispaired,cmdchannel);
//printf("LP_psock ipaddr.%s ispaird.%d cmdchannel.%d\n",ipaddr,ispaired,cmdchannel);
if ( cmdchannel == 0 )
{
maxport = MAX_PSOCK_PORT;
@ -694,7 +695,7 @@ char *LP_psock(int32_t *pubsockp,char *ipaddr,int32_t ispaired,int32_t cmdchanne
subport = publicport + 1;
if ( (retstr= _LP_psock_create(&pullsock,pubsockp,ipaddr,publicport,subport,ispaired,cmdchannel)) != 0 )
{
printf("LP_psock returns.(%s)\n",retstr);
//printf("LP_psock returns.(%s)\n",retstr);
return(retstr);
}
if ( cmdchannel == 0 )

2
iguana/exchanges/stats.c

@ -568,7 +568,7 @@ char *stats_rpcparse(char *retbuf,int32_t bufsize,int32_t *jsonflagp,int32_t *po
free_json(json);
if ( tmpjson != 0 )
free(tmpjson);
printf("stats_JSON rpc return.(%s)\n",retstr);
//printf("stats_JSON rpc return.(%s)\n",retstr);
return(retstr);
}
free_json(argjson);

Loading…
Cancel
Save