diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/anytun-config.cpp | 10 | ||||
-rw-r--r-- | src/anytun.cpp | 4 | ||||
-rw-r--r-- | src/packetSource.cpp | 4 | ||||
-rw-r--r-- | src/packetSource.h | 2 | ||||
-rw-r--r-- | src/syncServer.cpp | 4 | ||||
-rw-r--r-- | src/syncServer.h | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/src/anytun-config.cpp b/src/anytun-config.cpp index ff36487..ccdcc2c 100644 --- a/src/anytun-config.cpp +++ b/src/anytun-config.cpp @@ -99,7 +99,7 @@ void createConnection(const PacketSourceEndpoint& remote_end, ConnectionList& cl sem.up(); } -void createConnectionResolver(PacketSourceResolverIt& it, ConnectionList& cl, uint16_t seqSize, SyncQueue& queue, mux_t mux, Semaphore& sem) +void createConnectionResolver(PacketSourceResolverIt it, ConnectionList& cl, uint16_t seqSize, SyncQueue& queue, mux_t mux, Semaphore& sem) { createConnection(*it, cl, seqSize, queue, mux, sem); } @@ -139,10 +139,10 @@ int main(int argc, char* argv[]) int ret = 0; UDPPacketSource::proto::endpoint endpoint; // allow emtpy endpoint!!! -// gResolver.resolveUdp(gOpt.getRemoteAddr(), gOpt.getRemotePort(), -// boost::bind(createConnectionResolver, _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()); + gResolver.resolveUdp(gOpt.getRemoteAddr(), gOpt.getRemotePort(), + boost::bind(createConnectionResolver, _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; } diff --git a/src/anytun.cpp b/src/anytun.cpp index 909313d..36ca0aa 100644 --- a/src/anytun.cpp +++ b/src/anytun.cpp @@ -113,7 +113,7 @@ void createConnection(const PacketSourceEndpoint& remote_end, window_size_t seqS #endif } -void createConnectionResolver(PacketSourceResolverIt& it, window_size_t seqSize, mux_t mux) +void createConnectionResolver(PacketSourceResolverIt it, window_size_t seqSize, mux_t mux) { createConnection(*it, seqSize, mux); } @@ -434,7 +434,7 @@ int main(int argc, char* argv[]) PacketSource* src = new UDPPacketSource(gOpt.getLocalAddr(), gOpt.getLocalPort()); if(gOpt.getRemoteAddr() != "") { - //gResolver.resolveUdp(gOpt.getRemoteAddr(), gOpt.getRemotePort(), boost::bind(createConnectionResolver, _1, gOpt.getSeqWindowSize(), gOpt.getMux()), boost::bind(createConnectionError, _1), gOpt.getResolvAddrType()); + gResolver.resolveUdp(gOpt.getRemoteAddr(), gOpt.getRemotePort(), boost::bind(createConnectionResolver, _1, gOpt.getSeqWindowSize(), gOpt.getMux()), boost::bind(createConnectionError, _1), gOpt.getResolvAddrType()); } HostList connect_to = gOpt.getRemoteSyncHosts(); diff --git a/src/packetSource.cpp b/src/packetSource.cpp index 8357c64..711a206 100644 --- a/src/packetSource.cpp +++ b/src/packetSource.cpp @@ -62,7 +62,7 @@ void PacketSource::waitUntilReady() UDPPacketSource::UDPPacketSource(std::string localaddr, std::string port) { -// gResolver.resolveUdp(localaddr, port, boost::bind(&UDPPacketSource::onResolve, this, _1), boost::bind(&UDPPacketSource::onError, this, _1), gOpt.getResolvAddrType()); + gResolver.resolveUdp(localaddr, port, boost::bind(&UDPPacketSource::onResolve, this, _1), boost::bind(&UDPPacketSource::onError, this, _1), gOpt.getResolvAddrType()); } UDPPacketSource::~UDPPacketSource() @@ -76,7 +76,7 @@ UDPPacketSource::~UDPPacketSource() } } -void UDPPacketSource::onResolve(PacketSourceResolverIt& it) +void UDPPacketSource::onResolve(PacketSourceResolverIt it) { while(it != PacketSourceResolverIt()) { PacketSourceEndpoint e = *it; diff --git a/src/packetSource.h b/src/packetSource.h index 14ea9e9..a6656e3 100644 --- a/src/packetSource.h +++ b/src/packetSource.h @@ -83,7 +83,7 @@ public: uint32_t recv(uint8_t* buf, uint32_t len, PacketSourceEndpoint& remote); void send(uint8_t* buf, uint32_t len, PacketSourceEndpoint remote); - void onResolve(PacketSourceResolverIt& it); + void onResolve(PacketSourceResolverIt it); void onError(const std::runtime_error& e); private: diff --git a/src/syncServer.cpp b/src/syncServer.cpp index 0c2b2b8..1e6e352 100644 --- a/src/syncServer.cpp +++ b/src/syncServer.cpp @@ -53,7 +53,7 @@ SyncServer::SyncServer(std::string localaddr, std::string port, ConnectCallback onConnect) : onConnect_(onConnect) { -// gResolver.resolveTcp(localaddr, port, boost::bind(&SyncServer::onResolve, this, _1), boost::bind(&SyncServer::onResolvError, this, _1)); + gResolver.resolveTcp(localaddr, port, boost::bind(&SyncServer::onResolve, this, _1), boost::bind(&SyncServer::onResolvError, this, _1)); } SyncServer::~SyncServer() @@ -65,7 +65,7 @@ SyncServer::~SyncServer() } } -void SyncServer::onResolve(SyncTcpConnection::proto::resolver::iterator& it) +void SyncServer::onResolve(SyncTcpConnection::proto::resolver::iterator it) { while(it != SyncTcpConnection::proto::resolver::iterator()) { SyncTcpConnection::proto::endpoint e = *it; diff --git a/src/syncServer.h b/src/syncServer.h index 9be3fd0..c36e93d 100644 --- a/src/syncServer.h +++ b/src/syncServer.h @@ -64,7 +64,7 @@ class SyncServer public: SyncServer(std::string localaddr, std::string port, ConnectCallback onConnect); ~SyncServer(); - void onResolve(SyncTcpConnection::proto::resolver::iterator& it); + void onResolve(SyncTcpConnection::proto::resolver::iterator it); void onResolvError(const std::runtime_error& e); void run(); |