diff --git a/iguana/exchanges/LP_network.c b/iguana/exchanges/LP_network.c index 28e9d3382..deae086a6 100644 --- a/iguana/exchanges/LP_network.c +++ b/iguana/exchanges/LP_network.c @@ -300,7 +300,7 @@ char *LP_psock(char *myipaddr,int32_t ispaired) pullsock = pubsock = -1; nanomsg_transportname(1,pushaddr,myipaddr,publicport); nanomsg_transportname(1,subaddr,myipaddr,subport); - if ( (pullsock= nn_socket(AF_SP,ispaired!=0?NN_PAIR:NN_PULL)) >= 0 && (pubsock= nn_socket(AF_SP,ispaired!=0?NN_PAIR:NN_BUS)) >= 0 ) + if ( (pullsock= nn_socket(AF_SP,ispaired!=0?NN_PAIR:NN_PULL)) >= 0 && (pubsock= nn_socket(AF_SP,ispaired!=0?NN_PAIR:NN_PAIR)) >= 0 ) { if ( nn_bind(pullsock,pushaddr) >= 0 && nn_bind(pubsock,subaddr) >= 0 ) { @@ -389,7 +389,7 @@ int32_t LP_initpublicaddr(uint16_t *mypullportp,char *publicaddr,char *myipaddr, { if ( LP_canbind != 0 ) nntype = LP_COMMAND_RECVSOCK; - else nntype = NN_BUS;//NN_SUB; + else nntype = NN_PAIR;//NN_SUB; } else nntype = NN_PAIR; if ( LP_canbind != 0 ) { diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index 5f3007957..c4e4a00af 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -132,7 +132,6 @@ uint16_t LP_psock_get(char *connectaddr,char *publicaddr,int32_t ispaired) { if ( (retstr= issue_LP_psock(peer->ipaddr,peer->port,ispaired)) != 0 ) { - //printf("got.(%s)\n",retstr); if ( (retjson= cJSON_Parse(retstr)) != 0 ) { if ( (addr= jstr(retjson,"publicaddr")) != 0 ) @@ -143,6 +142,7 @@ uint16_t LP_psock_get(char *connectaddr,char *publicaddr,int32_t ispaired) publicport = juint(retjson,"publicport"); free_json(retjson); } + printf("got.(%s) connect.%s public.%s\n",retstr,connectaddr,publicaddr); free(retstr); } if ( publicport != 0 )