|
|
@ -84,16 +84,16 @@ void LP_main(void *ptr) |
|
|
|
netid = juint(argjson,"netid"); |
|
|
|
if ( netid < 0 ) |
|
|
|
netid = 0; |
|
|
|
else if ( netid > (65535-30-LP_RPCPORT)/3 ) |
|
|
|
else if ( netid > (65535-40-LP_RPCPORT)/4 ) |
|
|
|
{ |
|
|
|
printf("netid.%d overflow vs max netid.%d 19240?\n",netid,(65535-30-LP_RPCPORT)/3); |
|
|
|
printf("netid.%d overflow vs max netid.%d 14420?\n",netid,(65535-40-LP_RPCPORT)/4); |
|
|
|
exit(-1); |
|
|
|
} |
|
|
|
if ( netid != 0 ) |
|
|
|
{ |
|
|
|
netmod = (netid % 10); |
|
|
|
netdiv = (netid / 10); |
|
|
|
otherports = (netdiv * 30) + (LP_RPCPORT + netmod); |
|
|
|
otherports = (netdiv * 40) + (LP_RPCPORT + netmod); |
|
|
|
} else otherports = LP_RPCPORT; |
|
|
|
printf("RPCport.%d remoteport.%d, nanoports %d %d %d\n",port,port-1,otherports+10,otherports+20,otherports+30); |
|
|
|
LPinit(port,otherports+10,otherports+20,otherports+30,passphrase,jint(argjson,"client"),jstr(argjson,"userhome"),argjson); |
|
|
|