diff options
author | Christian Pointner <equinox@anytun.org> | 2010-01-08 02:42:23 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2010-01-08 02:42:23 +0000 |
commit | 951d51c32f93d9fb1e6e697843b19b9b698e39a1 (patch) | |
tree | d3af3018b8a435c92e05b209a3f3f5839c727509 /src/anytun-config.cpp | |
parent | added visual studio build targets with gcrypt (diff) |
moved to resolver iterator at onResolve callback functions
Diffstat (limited to 'src/anytun-config.cpp')
-rw-r--r-- | src/anytun-config.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/anytun-config.cpp b/src/anytun-config.cpp index f8bc4f4..4ef4112 100644 --- a/src/anytun-config.cpp +++ b/src/anytun-config.cpp @@ -88,6 +88,11 @@ void createConnection(const PacketSourceEndpoint & remote_end, ConnectionList & sem.up(); } +void createConnectionResolver(const PacketSourceResolverIt& it, ConnectionList & cl, u_int16_t seqSize, SyncQueue & queue, mux_t mux, Semaphore& sem) +{ + createConnection(*it, cl, seqSize, queue, mux, sem); +} + void createConnectionError(const std::exception& e, Semaphore& sem, int& ret) { cLog.msg(Log::PRIO_ERROR) << "uncaught runtime error: " << e.what(); @@ -133,7 +138,7 @@ int main(int argc, char* argv[]) UDPPacketSource::proto::endpoint endpoint; // 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(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(); |