mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-13 04:46:38 +01:00
fixed resolve bug
This commit is contained in:
parent
bf7b53a2a6
commit
284fb5458e
1 changed files with 3 additions and 4 deletions
|
@ -1,5 +1,4 @@
|
||||||
#include <cryptopp/dh.h>
|
#include <cryptopp/dh.h>
|
||||||
#include <boost/bind.hpp>
|
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
#include "CryptoConst.h"
|
#include "CryptoConst.h"
|
||||||
#include "RouterContext.h"
|
#include "RouterContext.h"
|
||||||
|
@ -182,7 +181,7 @@ namespace transport
|
||||||
|
|
||||||
void Transports::SendMessage (const i2p::data::IdentHash& ident, i2p::I2NPMessage * msg)
|
void Transports::SendMessage (const i2p::data::IdentHash& ident, i2p::I2NPMessage * msg)
|
||||||
{
|
{
|
||||||
m_Service.post (boost::bind (&Transports::PostMessage, this, ident, msg));
|
m_Service.post (std::bind (&Transports::PostMessage, this, ident, msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Transports::PostMessage (const i2p::data::IdentHash& ident, i2p::I2NPMessage * msg)
|
void Transports::PostMessage (const i2p::data::IdentHash& ident, i2p::I2NPMessage * msg)
|
||||||
|
@ -290,7 +289,7 @@ namespace transport
|
||||||
void Transports::NTCPResolve (const std::string& addr, const i2p::data::IdentHash& ident)
|
void Transports::NTCPResolve (const std::string& addr, const i2p::data::IdentHash& ident)
|
||||||
{
|
{
|
||||||
auto resolver = std::make_shared<boost::asio::ip::tcp::resolver>(m_Service);
|
auto resolver = std::make_shared<boost::asio::ip::tcp::resolver>(m_Service);
|
||||||
resolver->async_resolve (boost::asio::ip::tcp::resolver::query (addr),
|
resolver->async_resolve (boost::asio::ip::tcp::resolver::query (addr, ""),
|
||||||
std::bind (&Transports::HandleNTCPResolve, this,
|
std::bind (&Transports::HandleNTCPResolve, this,
|
||||||
std::placeholders::_1, std::placeholders::_2, ident, resolver));
|
std::placeholders::_1, std::placeholders::_2, ident, resolver));
|
||||||
}
|
}
|
||||||
|
@ -323,7 +322,7 @@ namespace transport
|
||||||
void Transports::CloseSession (std::shared_ptr<const i2p::data::RouterInfo> router)
|
void Transports::CloseSession (std::shared_ptr<const i2p::data::RouterInfo> router)
|
||||||
{
|
{
|
||||||
if (!router) return;
|
if (!router) return;
|
||||||
m_Service.post (boost::bind (&Transports::PostCloseSession, this, router));
|
m_Service.post (std::bind (&Transports::PostCloseSession, this, router));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Transports::PostCloseSession (std::shared_ptr<const i2p::data::RouterInfo> router)
|
void Transports::PostCloseSession (std::shared_ptr<const i2p::data::RouterInfo> router)
|
||||||
|
|
Loading…
Add table
Reference in a new issue