diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-03-27 18:22:53 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-03-27 18:22:53 -0700 |
| commit | 181369964f501c3c702971b30c82b9e84eed58db (patch) | |
| tree | da47762818c122211839638acc9c2b7c42914fa5 /node/Node.cpp | |
| parent | 73c1d43f2f1e0c22b21636e09be8a3e6f512faf0 (diff) | |
| download | infinitytier-181369964f501c3c702971b30c82b9e84eed58db.tar.gz infinitytier-181369964f501c3c702971b30c82b9e84eed58db.zip | |
Make TCP optional, rename port constant.
Diffstat (limited to 'node/Node.cpp')
| -rw-r--r-- | node/Node.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index 20a049bc..913b7400 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -377,8 +377,8 @@ Node::Node(const char *hp,unsigned int udpPort,unsigned int tcpPort,bool resetId } } - impl->udpPort = ((udpPort > 0)&&(udpPort <= 0xffff)) ? udpPort : (unsigned int)ZT_DEFAULT_PORT; - impl->tcpPort = ((tcpPort > 0)&&(tcpPort <= 0xffff)) ? tcpPort : (unsigned int)ZT_DEFAULT_PORT; + impl->udpPort = udpPort & 0xffff; + impl->tcpPort = tcpPort & 0xffff; impl->reasonForTermination = Node::NODE_RUNNING; impl->started = false; impl->running = false; |
