From ac490faf7122e15c453fbcef5a2284dd8379c3b7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Feb 2018 14:17:20 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_network.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_network.c b/iguana/exchanges/LP_network.c index 6e813f0d0..d7222327a 100644 --- a/iguana/exchanges/LP_network.c +++ b/iguana/exchanges/LP_network.c @@ -674,6 +674,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); if ( cmdchannel == 0 ) { maxport = MAX_PSOCK_PORT; @@ -689,10 +690,13 @@ char *LP_psock(int32_t *pubsockp,char *ipaddr,int32_t ispaired,int32_t cmdchanne { if ( publicport < MIN_PSOCK_PORT ) publicport = MIN_PSOCK_PORT+1; - if ( subport <= publicport ) + if ( cmdchannel == 0 && subport <= publicport ) subport = publicport + 1; if ( (retstr= _LP_psock_create(&pullsock,pubsockp,ipaddr,publicport,subport,ispaired,cmdchannel)) != 0 ) + { + printf("LP_psock returns.(%s)\n",retstr); return(retstr); + } if ( cmdchannel == 0 ) publicport+=2, subport+=2; else publicport++, subport++;