From 8c49f76534088fedce2cdb96e05bf8efbb651fb4 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 31 Dec 2014 21:47:49 -0500 Subject: [PATCH] copy request to buffer if LeaseSet is requested --- HTTPServer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/HTTPServer.cpp b/HTTPServer.cpp index 2248ff83..f2679817 100644 --- a/HTTPServer.cpp +++ b/HTTPServer.cpp @@ -874,10 +874,12 @@ namespace util SendToDestination (leaseSet, port, buf, len); else { + memcpy (m_Buffer, buf, len); + m_BufferLen = len; i2p::client::context.GetSharedLocalDestination ()->RequestDestination (destination); m_Timer.expires_from_now (boost::posix_time::seconds(HTTP_DESTINATION_REQUEST_TIMEOUT)); m_Timer.async_wait (boost::bind (&HTTPConnection::HandleDestinationRequestTimeout, - this, boost::asio::placeholders::error, destination, port, buf, len)); + this, boost::asio::placeholders::error, destination, port, m_Buffer, m_BufferLen)); } }