From 6431129558fa9e4d1b3de8fc6439594cd01d53de Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 3 Jul 2016 00:08:18 +0200 Subject: 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... --- src/anytun.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/anytun.cpp') 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 #include #include +#include #include #include @@ -151,8 +152,8 @@ void sender(TunDevice* dev, PacketSource* src) } try { - std::auto_ptr c(CipherFactory::create(gOpt.getCipher(), KD_OUTBOUND)); - std::auto_ptr a(AuthAlgoFactory::create(gOpt.getAuthAlgo(), KD_OUTBOUND)); + boost::scoped_ptr c(CipherFactory::create(gOpt.getCipher(), KD_OUTBOUND)); + boost::scoped_ptr 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 c(CipherFactory::create(gOpt.getCipher(), KD_INBOUND)); - std::auto_ptr a(AuthAlgoFactory::create(gOpt.getAuthAlgo(), KD_INBOUND)); + boost::scoped_ptr c(CipherFactory::create(gOpt.getCipher(), KD_INBOUND)); + boost::scoped_ptr 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(); -- cgit v1.2.3