X-Git-Url: https://git.syn-net.org/debian/?a=blobdiff_plain;f=src%2Fanytun.cpp;h=36ca0aad9cb012a9cf40bf3951ad602ff57255b3;hb=refs%2Fremotes%2Forigin%2Fmaster;hp=3f14a5e52813f4dd179405bc14822cddf78292b1;hpb=1793ae80499cd294db66051a0ff03ba714b09ac3;p=anytun.git diff --git a/src/anytun.cpp b/src/anytun.cpp index 3f14a5e..36ca0aa 100644 --- a/src/anytun.cpp +++ b/src/anytun.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -112,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); } @@ -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);