Browse Source

eliminate boost/bind

pull/1553/head
orignal 4 years ago
parent
commit
024c29b180
  1. 5
      daemon/HTTPServer.cpp
  2. 11
      daemon/UPnP.cpp
  3. 1
      libi2pd/SSU.cpp
  4. 1
      libi2pd/SSUData.cpp
  5. 1
      libi2pd/SSUSession.cpp

5
daemon/HTTPServer.cpp

@ -12,7 +12,6 @@ @@ -12,7 +12,6 @@
#include <memory>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <boost/algorithm/string.hpp>
#include "Base.h"
@ -1321,8 +1320,8 @@ namespace http { @@ -1321,8 +1320,8 @@ namespace http {
void HTTPServer::Accept ()
{
auto newSocket = std::make_shared<boost::asio::ip::tcp::socket> (m_Service);
m_Acceptor.async_accept (*newSocket, boost::bind (&HTTPServer::HandleAccept, this,
boost::asio::placeholders::error, newSocket));
m_Acceptor.async_accept (*newSocket, std::bind (&HTTPServer::HandleAccept, this,
std::placeholders::_1, newSocket));
}
void HTTPServer::HandleAccept(const boost::system::error_code& ecode,

11
daemon/UPnP.cpp

@ -1,18 +1,9 @@ @@ -1,18 +1,9 @@
/*
* Copyright (c) 2013-2020, The PurpleI2P Project
*
* This file is part of Purple i2pd project and licensed under BSD3
*
* See full license text in LICENSE file at top of project tree
*/
#ifdef USE_UPNP
#include <string>
#include <thread>
#include <boost/thread/thread.hpp>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include "Log.h"
@ -118,7 +109,7 @@ namespace transport @@ -118,7 +109,7 @@ namespace transport
}
err = UPNP_GetValidIGD (m_Devlist, &m_upnpUrls, &m_upnpData, m_NetworkAddr, sizeof (m_NetworkAddr));
m_upnpUrlsInitialized = err != 0;
m_upnpUrlsInitialized=err!=0;
if (err == UPNP_IGD_VALID_CONNECTED)
{
err = UPNP_GetExternalIPAddress (m_upnpUrls.controlURL, m_upnpData.first.servicetype, m_externalIPAddress);

1
libi2pd/SSU.cpp

@ -7,7 +7,6 @@ @@ -7,7 +7,6 @@
*/
#include <string.h>
#include <boost/bind.hpp>
#include "Log.h"
#include "Timestamp.h"
#include "RouterContext.h"

1
libi2pd/SSUData.cpp

@ -7,7 +7,6 @@ @@ -7,7 +7,6 @@
*/
#include <stdlib.h>
#include <boost/bind.hpp>
#include "Log.h"
#include "Timestamp.h"
#include "NetDb.hpp"

1
libi2pd/SSUSession.cpp

@ -6,7 +6,6 @@ @@ -6,7 +6,6 @@
* See full license text in LICENSE file at top of project tree
*/
#include <boost/bind.hpp>
#include "version.h"
#include "Crypto.h"
#include "Log.h"

Loading…
Cancel
Save