diff options
author | Christian Pointner <equinox@anytun.org> | 2016-07-03 00:08:18 +0200 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2016-07-03 01:31:22 +0200 |
commit | 6431129558fa9e4d1b3de8fc6439594cd01d53de (patch) | |
tree | cafb483a2ba60dc8a9452d62d837e29115820607 /src/anytun.cpp | |
parent | updated some info after moving to GIT (diff) |
std::auto_ptr is deprecated sinc C++0x use boost:scoped_ptr and boost::shared_ptr as a backwards compatiple replacement
boost::bind problem with GCC-6 is still unfixed and all
resolvers are commented out at the moment...
Diffstat (limited to 'src/anytun.cpp')
-rw-r--r-- | src/anytun.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp index 3f14a5e..909313d 100644 --- a/src/anytun.cpp +++ b/src/anytun.cpp @@ -46,6 +46,7 @@ #include <boost/bind.hpp> #include <boost/thread.hpp> #include <boost/assign.hpp> +#include <boost/scoped_ptr.hpp> #include <iostream> #include <fstream> @@ -151,8 +152,8 @@ void sender(TunDevice* dev, PacketSource* src) } try { - std::auto_ptr<Cipher> c(CipherFactory::create(gOpt.getCipher(), KD_OUTBOUND)); - std::auto_ptr<AuthAlgo> a(AuthAlgoFactory::create(gOpt.getAuthAlgo(), KD_OUTBOUND)); + boost::scoped_ptr<Cipher> c(CipherFactory::create(gOpt.getCipher(), KD_OUTBOUND)); + boost::scoped_ptr<AuthAlgo> a(AuthAlgoFactory::create(gOpt.getAuthAlgo(), KD_OUTBOUND)); PlainPacket plain_packet(MAX_PACKET_LENGTH); EncryptedPacket encrypted_packet(MAX_PACKET_LENGTH, gOpt.getAuthTagLength()); @@ -243,8 +244,8 @@ void receiver(TunDevice* dev, PacketSource* src) } try { - std::auto_ptr<Cipher> c(CipherFactory::create(gOpt.getCipher(), KD_INBOUND)); - std::auto_ptr<AuthAlgo> a(AuthAlgoFactory::create(gOpt.getAuthAlgo(), KD_INBOUND)); + boost::scoped_ptr<Cipher> c(CipherFactory::create(gOpt.getCipher(), KD_INBOUND)); + boost::scoped_ptr<AuthAlgo> a(AuthAlgoFactory::create(gOpt.getAuthAlgo(), KD_INBOUND)); uint32_t auth_tag_length = gOpt.getAuthTagLength(); EncryptedPacket encrypted_packet(MAX_PACKET_LENGTH, auth_tag_length); @@ -433,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(); |