summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2009-04-14 20:02:15 +0000
committerOthmar Gsenger <otti@anytun.org>2009-04-14 20:02:15 +0000
commit58ded10fe99676f9bd4835712741513bd9a9fb36 (patch)
tree26af37501c1e12b43a7edc1d22d9f3b7bff46d45 /src
parentupdated ChangeLog and Readme (diff)
allow empty endpoint for config
Diffstat (limited to 'src')
-rw-r--r--src/anytun-config.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/anytun-config.cpp b/src/anytun-config.cpp
index 1004c6e..72e4902 100644
--- a/src/anytun-config.cpp
+++ b/src/anytun-config.cpp
@@ -130,14 +130,12 @@ int main(int argc, char* argv[])
Semaphore sem;
int ret = 0;
UDPPacketSource::proto::endpoint endpoint;
- if (gOpt.getRemoteAddr()!="" && gOpt.getRemotePort()!="") {
- gResolver.resolveUdp(gOpt.getRemoteAddr(), gOpt.getRemotePort(),
- boost::bind(createConnection, _1, boost::ref(cl), gOpt.getSeqWindowSize(), boost::ref(queue), gOpt.getMux(), boost::ref(sem)),
- boost::bind(createConnectionError, _1, boost::ref(sem), boost::ref(ret)),
- gOpt.getResolvAddrType());
- sem.down();
- }
-
+ // allow emtpy endpoint!!!
+ gResolver.resolveUdp(gOpt.getRemoteAddr(), gOpt.getRemotePort(),
+ boost::bind(createConnection, _1, boost::ref(cl), gOpt.getSeqWindowSize(), boost::ref(queue), gOpt.getMux(), boost::ref(sem)),
+ boost::bind(createConnectionError, _1, boost::ref(sem), boost::ref(ret)),
+ gOpt.getResolvAddrType());
+ sem.down();
return ret;
}