From 211660eb3d368e38fa4a4949a75130f4a679c4e0 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sun, 21 Aug 2016 22:23:27 -0400 Subject: [PATCH] osx fix --- I2PTunnel.cpp | 4 ++-- I2PTunnel.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/I2PTunnel.cpp b/I2PTunnel.cpp index 7f03311f..346baf29 100644 --- a/I2PTunnel.cpp +++ b/I2PTunnel.cpp @@ -545,7 +545,7 @@ namespace client return s; } - UDPSession::UDPSession(boost::asio::io_service & ios, boost::asio::ip::udp::endpoint localEndpoint, std::shared_ptr localDestination, boost::asio::ip::udp::endpoint endpoint, const i2p::data::IdentHash to, uint16_t ourPort, uint16_t theirPort) : + UDPSession::UDPSession(boost::asio::io_service & ios, boost::asio::ip::udp::endpoint localEndpoint, const std::shared_ptr & localDestination, boost::asio::ip::udp::endpoint endpoint, const i2p::data::IdentHash to, uint16_t ourPort, uint16_t theirPort) : m_Destination(localDestination), IPSocket(ios, localEndpoint), Identity(to), @@ -569,7 +569,7 @@ namespace client LogPrint(eLogDebug, "UDPSesssion: HandleRecveived"); if(!ecode) { LogPrint(eLogDebug, "UDPSession: forward ", len, "B from ", FromEndpoint); - auto dgram = m_Destination.get()->GetDatagramDestination().get(); + auto dgram = m_Destination->GetDatagramDestination(); if(dgram) { LastActivity = i2p::util::GetMillisecondsSinceEpoch(); dgram->SendDatagramTo(m_Buffer, len, Identity, 0, 0); diff --git a/I2PTunnel.h b/I2PTunnel.h index cc78722c..75eeaaef 100644 --- a/I2PTunnel.h +++ b/I2PTunnel.h @@ -152,7 +152,7 @@ namespace client uint8_t m_Buffer[I2P_UDP_MAX_MTU]; - UDPSession(boost::asio::io_service & ios, boost::asio::ip::udp::endpoint localEndpoint, std::shared_ptr localDestination, boost::asio::ip::udp::endpoint remote, const i2p::data::IdentHash ident, uint16_t ourPort, uint16_t theirPort); + UDPSession(boost::asio::io_service & ios, boost::asio::ip::udp::endpoint localEndpoint, const std::shared_ptr & localDestination, boost::asio::ip::udp::endpoint remote, const i2p::data::IdentHash ident, uint16_t ourPort, uint16_t theirPort); void HandleReceived(const boost::system::error_code & ecode, std::size_t len); void Receive();