From 0a6d849435390e1995e419b3d86394817c44baeb Mon Sep 17 00:00:00 2001 From: orignal Date: Mon, 30 Nov 2015 10:23:05 -0500 Subject: [PATCH] pass shared_ptr to SendRelayIntro --- SSUSession.cpp | 4 ++-- SSUSession.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SSUSession.cpp b/SSUSession.cpp index 33534ec1..b09dcf1f 100644 --- a/SSUSession.cpp +++ b/SSUSession.cpp @@ -479,7 +479,7 @@ namespace transport buf += 32; // introkey uint32_t nonce = bufbe32toh (buf); SendRelayResponse (nonce, from, introKey, session->m_RemoteEndpoint); - SendRelayIntro (session.get (), from); + SendRelayIntro (session, from); } } @@ -537,7 +537,7 @@ namespace transport LogPrint (eLogDebug, "SSU relay response sent"); } - void SSUSession::SendRelayIntro (SSUSession * session, const boost::asio::ip::udp::endpoint& from) + void SSUSession::SendRelayIntro (std::shared_ptr session, const boost::asio::ip::udp::endpoint& from) { if (!session) return; // Alice's address always v4 diff --git a/SSUSession.h b/SSUSession.h index cf6e688f..0c1c5254 100644 --- a/SSUSession.h +++ b/SSUSession.h @@ -108,7 +108,7 @@ namespace transport void ProcessRelayRequest (uint8_t * buf, size_t len, const boost::asio::ip::udp::endpoint& from); void SendRelayResponse (uint32_t nonce, const boost::asio::ip::udp::endpoint& from, const uint8_t * introKey, const boost::asio::ip::udp::endpoint& to); - void SendRelayIntro (SSUSession * session, const boost::asio::ip::udp::endpoint& from); + void SendRelayIntro (std::shared_ptr session, const boost::asio::ip::udp::endpoint& from); void ProcessRelayResponse (uint8_t * buf, size_t len); void ProcessRelayIntro (uint8_t * buf, size_t len); void Established ();