mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	Fix all unused parameter warnings (issue #260)
This commit is contained in:
		
							parent
							
								
									828ac404eb
								
							
						
					
					
						commit
						48c66a1d08
					
				
					 13 changed files with 60 additions and 60 deletions
				
			
		| 
						 | 
				
			
			@ -284,7 +284,7 @@ namespace client
 | 
			
		|||
                std::placeholders::_1, std::placeholders::_2));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void BOBCommandSession::HandleSent (const boost::system::error_code& ecode, std::size_t bytes_transferred)
 | 
			
		||||
    void BOBCommandSession::HandleSent (const boost::system::error_code& ecode, std::size_t)
 | 
			
		||||
    {
 | 
			
		||||
        if (ecode)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -338,20 +338,20 @@ namespace client
 | 
			
		|||
        Send (len);         
 | 
			
		||||
    }
 | 
			
		||||
        
 | 
			
		||||
    void BOBCommandSession::ZapCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::ZapCommandHandler (const char*, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: zap");
 | 
			
		||||
        Terminate ();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void BOBCommandSession::QuitCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::QuitCommandHandler (const char*, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: quit");
 | 
			
		||||
        m_IsOpen = false;
 | 
			
		||||
        SendReplyOK ("Bye!");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void BOBCommandSession::StartCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::StartCommandHandler (const char*, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: start ", m_Nickname);
 | 
			
		||||
        if (!m_CurrentDestination)
 | 
			
		||||
| 
						 | 
				
			
			@ -367,7 +367,7 @@ namespace client
 | 
			
		|||
        SendReplyOK ("tunnel starting");    
 | 
			
		||||
    }   
 | 
			
		||||
    
 | 
			
		||||
    void BOBCommandSession::StopCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::StopCommandHandler (const char*, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        auto dest = m_Owner.FindDestination (m_Nickname);
 | 
			
		||||
        if (dest)
 | 
			
		||||
| 
						 | 
				
			
			@ -379,7 +379,7 @@ namespace client
 | 
			
		|||
            SendReplyError ("tunnel not found");
 | 
			
		||||
    }   
 | 
			
		||||
    
 | 
			
		||||
    void BOBCommandSession::SetNickCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::SetNickCommandHandler (const char * operand, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: setnick ", operand);
 | 
			
		||||
        m_Nickname = operand;
 | 
			
		||||
| 
						 | 
				
			
			@ -388,7 +388,7 @@ namespace client
 | 
			
		|||
        SendReplyOK (msg.c_str ());
 | 
			
		||||
    }   
 | 
			
		||||
 | 
			
		||||
    void BOBCommandSession::GetNickCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::GetNickCommandHandler (const char * operand, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: getnick ", operand);
 | 
			
		||||
        m_CurrentDestination = m_Owner.FindDestination (operand); 
 | 
			
		||||
| 
						 | 
				
			
			@ -404,68 +404,68 @@ namespace client
 | 
			
		|||
            SendReplyError ("tunnel not found");    
 | 
			
		||||
    }   
 | 
			
		||||
 | 
			
		||||
    void BOBCommandSession::NewkeysCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::NewkeysCommandHandler (const char*, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: newkeys");
 | 
			
		||||
        m_Keys = i2p::data::PrivateKeys::CreateRandomKeys ();
 | 
			
		||||
        SendReplyOK (m_Keys.GetPublic ().ToBase64 ().c_str ());
 | 
			
		||||
    }   
 | 
			
		||||
 | 
			
		||||
    void BOBCommandSession::SetkeysCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::SetkeysCommandHandler (const char * operand, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: setkeys ", operand);
 | 
			
		||||
        m_Keys.FromBase64 (operand);
 | 
			
		||||
        SendReplyOK (m_Keys.GetPublic ().ToBase64 ().c_str ());
 | 
			
		||||
    }
 | 
			
		||||
        
 | 
			
		||||
    void BOBCommandSession::GetkeysCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::GetkeysCommandHandler (const char *, size_t)
 | 
			
		||||
    {       
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: getkeys");
 | 
			
		||||
        SendReplyOK (m_Keys.ToBase64 ().c_str ());
 | 
			
		||||
    }   
 | 
			
		||||
 | 
			
		||||
    void BOBCommandSession::GetdestCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::GetdestCommandHandler (const char*, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: getdest");
 | 
			
		||||
        SendReplyOK (m_Keys.GetPublic ().ToBase64 ().c_str ());
 | 
			
		||||
    }   
 | 
			
		||||
        
 | 
			
		||||
    void BOBCommandSession::OuthostCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::OuthostCommandHandler (const char * operand, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: outhost ", operand);
 | 
			
		||||
        m_Address = operand;
 | 
			
		||||
        SendReplyOK ("outhost set");
 | 
			
		||||
    }
 | 
			
		||||
        
 | 
			
		||||
    void BOBCommandSession::OutportCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::OutportCommandHandler (const char * operand, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: outport ", operand);
 | 
			
		||||
        m_OutPort = boost::lexical_cast<int>(operand);
 | 
			
		||||
        SendReplyOK ("outbound port set");
 | 
			
		||||
    }   
 | 
			
		||||
 | 
			
		||||
    void BOBCommandSession::InhostCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::InhostCommandHandler (const char * operand, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: inhost ", operand);
 | 
			
		||||
        m_Address = operand;
 | 
			
		||||
        SendReplyOK ("inhost set");
 | 
			
		||||
    }
 | 
			
		||||
        
 | 
			
		||||
    void BOBCommandSession::InportCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::InportCommandHandler (const char * operand, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: inport ", operand);
 | 
			
		||||
        m_InPort = boost::lexical_cast<int>(operand);
 | 
			
		||||
        SendReplyOK ("inbound port set");
 | 
			
		||||
    }       
 | 
			
		||||
 | 
			
		||||
    void BOBCommandSession::QuietCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::QuietCommandHandler (const char*, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: quiet");
 | 
			
		||||
        m_IsQuiet = true;
 | 
			
		||||
        SendReplyOK ("quiet");
 | 
			
		||||
    }   
 | 
			
		||||
    
 | 
			
		||||
    void BOBCommandSession::LookupCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::LookupCommandHandler (const char * operand, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: lookup ", operand);
 | 
			
		||||
        i2p::data::IdentHash ident;
 | 
			
		||||
| 
						 | 
				
			
			@ -493,14 +493,14 @@ namespace client
 | 
			
		|||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void BOBCommandSession::ClearCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::ClearCommandHandler (const char*, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: clear");
 | 
			
		||||
        m_Owner.DeleteDestination (m_Nickname);
 | 
			
		||||
        SendReplyOK ("cleared");
 | 
			
		||||
    }   
 | 
			
		||||
 | 
			
		||||
    void BOBCommandSession::ListCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::ListCommandHandler (const char*, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: list");
 | 
			
		||||
        auto& destinations = m_Owner.GetDestinations ();
 | 
			
		||||
| 
						 | 
				
			
			@ -509,7 +509,7 @@ namespace client
 | 
			
		|||
        SendReplyOK ("Listing done");
 | 
			
		||||
    }   
 | 
			
		||||
 | 
			
		||||
    void BOBCommandSession::OptionCommandHandler (const char * operand, size_t len)
 | 
			
		||||
    void BOBCommandSession::OptionCommandHandler (const char * operand, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "BOB: option ", operand);
 | 
			
		||||
        const char * value = strchr (operand, '=');
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -332,7 +332,7 @@ namespace client
 | 
			
		|||
    }   
 | 
			
		||||
 | 
			
		||||
    void I2PServerTunnel::HandleResolve (const boost::system::error_code& ecode, boost::asio::ip::tcp::resolver::iterator it, 
 | 
			
		||||
        std::shared_ptr<boost::asio::ip::tcp::resolver> resolver)
 | 
			
		||||
        std::shared_ptr<boost::asio::ip::tcp::resolver> )
 | 
			
		||||
    {   
 | 
			
		||||
        if (!ecode)
 | 
			
		||||
        {   
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -133,7 +133,7 @@ namespace client
 | 
			
		|||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void SAMSocket::HandleHandshakeReplySent (const boost::system::error_code& ecode, std::size_t bytes_transferred)
 | 
			
		||||
    void SAMSocket::HandleHandshakeReplySent (const boost::system::error_code& ecode, std::size_t)
 | 
			
		||||
    {
 | 
			
		||||
        if (ecode)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -164,7 +164,7 @@ namespace client
 | 
			
		|||
        }       
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void SAMSocket::HandleMessageReplySent (const boost::system::error_code& ecode, std::size_t bytes_transferred, bool close)
 | 
			
		||||
    void SAMSocket::HandleMessageReplySent (const boost::system::error_code& ecode, std::size_t, bool close)
 | 
			
		||||
    {
 | 
			
		||||
        if (ecode)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -258,7 +258,7 @@ namespace client
 | 
			
		|||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void SAMSocket::ProcessSessionCreate (char * buf, size_t len)
 | 
			
		||||
    void SAMSocket::ProcessSessionCreate (char * buf, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint ("SAM session create: ", buf);
 | 
			
		||||
        std::map<std::string, std::string> params;
 | 
			
		||||
| 
						 | 
				
			
			@ -329,7 +329,7 @@ namespace client
 | 
			
		|||
        SendMessageReply (m_Buffer, l2, false);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void SAMSocket::ProcessStreamConnect (char * buf, size_t len)
 | 
			
		||||
    void SAMSocket::ProcessStreamConnect (char * buf, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "SAM stream connect: ", buf);
 | 
			
		||||
        std::map<std::string, std::string> params;
 | 
			
		||||
| 
						 | 
				
			
			@ -385,7 +385,7 @@ namespace client
 | 
			
		|||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void SAMSocket::ProcessStreamAccept (char * buf, size_t len)
 | 
			
		||||
    void SAMSocket::ProcessStreamAccept (char * buf, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "SAM stream accept: ", buf);
 | 
			
		||||
        std::map<std::string, std::string> params;
 | 
			
		||||
| 
						 | 
				
			
			@ -456,7 +456,7 @@ namespace client
 | 
			
		|||
        SendMessageReply (m_Buffer, len, false);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void SAMSocket::ProcessNamingLookup (char * buf, size_t len)
 | 
			
		||||
    void SAMSocket::ProcessNamingLookup (char * buf, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "SAM naming lookup: ", buf);
 | 
			
		||||
        std::map<std::string, std::string> params;
 | 
			
		||||
| 
						 | 
				
			
			@ -643,7 +643,7 @@ namespace client
 | 
			
		|||
            LogPrint (eLogInfo, "SAM I2P acceptor has been reset");
 | 
			
		||||
    }   
 | 
			
		||||
 | 
			
		||||
    void SAMSocket::HandleI2PDatagramReceive (const i2p::data::IdentityEx& from, uint16_t fromPort, uint16_t toPort, const uint8_t * buf, size_t len)
 | 
			
		||||
    void SAMSocket::HandleI2PDatagramReceive (const i2p::data::IdentityEx& from, uint16_t, uint16_t, const uint8_t * buf, size_t len)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "SAM datagram received ", len);
 | 
			
		||||
        auto base64 = from.ToBase64 ();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -238,7 +238,7 @@ void I2PControlSession::handleEcho(const PropertyTree& pt, Response& response)
 | 
			
		|||
    response.setParam(I2P_CONTROL_PARAM_RESULT, echo);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void I2PControlSession::handleI2PControl(const PropertyTree& pt, Response& response)
 | 
			
		||||
void I2PControlSession::handleI2PControl(const PropertyTree&, Response&)
 | 
			
		||||
{
 | 
			
		||||
    LogPrint(eLogDebug, "I2PControl I2PControl");
 | 
			
		||||
    // TODO: implement
 | 
			
		||||
| 
						 | 
				
			
			@ -279,9 +279,9 @@ void I2PControlSession::handleRouterManager(const PropertyTree& pt, Response& re
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void I2PControlSession::handleNetworkSetting(const PropertyTree& pt, Response& response)
 | 
			
		||||
void I2PControlSession::handleNetworkSetting(const PropertyTree&, Response&)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    // TODO: implement
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void I2PControlSession::handleUptime(Response& response)
 | 
			
		||||
| 
						 | 
				
			
			@ -351,7 +351,7 @@ void I2PControlSession::handleShutdown(Response& response)
 | 
			
		|||
    response.setParam(I2P_CONTROL_ROUTER_MANAGER_SHUTDOWN, "");
 | 
			
		||||
    // 1 second to make sure response has been sent
 | 
			
		||||
    shutdownTimer.expires_from_now(boost::posix_time::seconds(1));
 | 
			
		||||
    shutdownTimer.async_wait([](const boost::system::error_code& ecode) {
 | 
			
		||||
    shutdownTimer.async_wait([](const boost::system::error_code&) {
 | 
			
		||||
        Daemon.running = 0; 
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -363,7 +363,7 @@ void I2PControlSession::handleShutdownGraceful(Response& response)
 | 
			
		|||
    LogPrint(eLogInfo, "Graceful shutdown requested. Will shutdown after ", timeout, " seconds");
 | 
			
		||||
    response.setParam(I2P_CONTROL_ROUTER_MANAGER_SHUTDOWN_GRACEFUL, "");
 | 
			
		||||
    shutdownTimer.expires_from_now(boost::posix_time::seconds(timeout + 1));
 | 
			
		||||
    shutdownTimer.async_wait([](const boost::system::error_code& ecode) {
 | 
			
		||||
    shutdownTimer.async_wait([](const boost::system::error_code&) {
 | 
			
		||||
        Daemon.running = 0; 
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -225,7 +225,7 @@ namespace client
 | 
			
		|||
        m_Service.post (std::bind (&ClientDestination::HandleDeliveryStatusMessage, this, msg)); 
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void ClientDestination::HandleI2NPMessage (const uint8_t * buf, size_t len, std::shared_ptr<i2p::tunnel::InboundTunnel> from)
 | 
			
		||||
    void ClientDestination::HandleI2NPMessage (const uint8_t * buf, size_t, std::shared_ptr<i2p::tunnel::InboundTunnel> from)
 | 
			
		||||
    {
 | 
			
		||||
        uint8_t typeID = buf[I2NP_HEADER_TYPEID_OFFSET];
 | 
			
		||||
        switch (typeID)
 | 
			
		||||
| 
						 | 
				
			
			@ -303,7 +303,7 @@ namespace client
 | 
			
		|||
        }   
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void ClientDestination::HandleDatabaseSearchReplyMessage (const uint8_t * buf, size_t len)
 | 
			
		||||
    void ClientDestination::HandleDatabaseSearchReplyMessage (const uint8_t * buf, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        i2p::data::IdentHash key (buf);
 | 
			
		||||
        int num = buf[32]; // num
 | 
			
		||||
| 
						 | 
				
			
			@ -417,7 +417,7 @@ namespace client
 | 
			
		|||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void ClientDestination::HandleDataMessage (const uint8_t * buf, size_t len)
 | 
			
		||||
    void ClientDestination::HandleDataMessage (const uint8_t * buf, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        uint32_t length = bufbe32toh (buf);
 | 
			
		||||
        buf += 4;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,7 @@ namespace data
 | 
			
		|||
        return *this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    size_t Identity::FromBuffer (const uint8_t * buf, size_t len)
 | 
			
		||||
    size_t Identity::FromBuffer (const uint8_t * buf, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        memcpy (publicKey, buf, DEFAULT_IDENTITY_SIZE);
 | 
			
		||||
        return DEFAULT_IDENTITY_SIZE;
 | 
			
		||||
| 
						 | 
				
			
			@ -227,7 +227,7 @@ namespace data
 | 
			
		|||
        return GetFullLen ();
 | 
			
		||||
    }   
 | 
			
		||||
 | 
			
		||||
    size_t IdentityEx::ToBuffer (uint8_t * buf, size_t len) const
 | 
			
		||||
    size_t IdentityEx::ToBuffer (uint8_t * buf, size_t) const
 | 
			
		||||
    {       
 | 
			
		||||
        memcpy (buf, &m_StandardIdentity, DEFAULT_IDENTITY_SIZE);
 | 
			
		||||
        if (m_ExtendedLen > 0 && m_ExtendedBuffer)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -294,7 +294,7 @@ namespace i2p
 | 
			
		|||
        return i2p::tunnel::tunnels.GetExploratoryPool (); 
 | 
			
		||||
    }   
 | 
			
		||||
        
 | 
			
		||||
    void RouterContext::HandleI2NPMessage (const uint8_t * buf, size_t len, std::shared_ptr<i2p::tunnel::InboundTunnel> from)
 | 
			
		||||
    void RouterContext::HandleI2NPMessage (const uint8_t * buf, size_t, std::shared_ptr<i2p::tunnel::InboundTunnel> from)
 | 
			
		||||
    {
 | 
			
		||||
        i2p::HandleI2NPMessage (CreateI2NPMessage (buf, GetI2NPMessageLength (buf), from));
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -692,7 +692,7 @@ namespace stream
 | 
			
		|||
        }   
 | 
			
		||||
    }   
 | 
			
		||||
        
 | 
			
		||||
    void Stream::HandleAckSendTimer (const boost::system::error_code& ecode)
 | 
			
		||||
    void Stream::HandleAckSendTimer (const boost::system::error_code&)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_IsAckSendScheduled)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -138,7 +138,7 @@ namespace transport
 | 
			
		|||
        }
 | 
			
		||||
    }   
 | 
			
		||||
        
 | 
			
		||||
    void NTCPSession::HandlePhase1Sent (const boost::system::error_code& ecode, std::size_t bytes_transferred)
 | 
			
		||||
    void NTCPSession::HandlePhase1Sent (const boost::system::error_code& ecode, std::size_t)
 | 
			
		||||
    {
 | 
			
		||||
        if (ecode)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -154,7 +154,7 @@ namespace transport
 | 
			
		|||
        }   
 | 
			
		||||
    }   
 | 
			
		||||
 | 
			
		||||
    void NTCPSession::HandlePhase1Received (const boost::system::error_code& ecode, std::size_t bytes_transferred)
 | 
			
		||||
    void NTCPSession::HandlePhase1Received (const boost::system::error_code& ecode, std::size_t)
 | 
			
		||||
    {
 | 
			
		||||
        if (ecode)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -209,7 +209,7 @@ namespace transport
 | 
			
		|||
 | 
			
		||||
    }   
 | 
			
		||||
        
 | 
			
		||||
    void NTCPSession::HandlePhase2Sent (const boost::system::error_code& ecode, std::size_t bytes_transferred, uint32_t tsB)
 | 
			
		||||
    void NTCPSession::HandlePhase2Sent (const boost::system::error_code& ecode, std::size_t, uint32_t tsB)
 | 
			
		||||
    {
 | 
			
		||||
        if (ecode)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -225,7 +225,7 @@ namespace transport
 | 
			
		|||
        }   
 | 
			
		||||
    }   
 | 
			
		||||
        
 | 
			
		||||
    void NTCPSession::HandlePhase2Received (const boost::system::error_code& ecode, std::size_t bytes_transferred)
 | 
			
		||||
    void NTCPSession::HandlePhase2Received (const boost::system::error_code& ecode, std::size_t)
 | 
			
		||||
    {
 | 
			
		||||
        if (ecode)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -299,7 +299,7 @@ namespace transport
 | 
			
		|||
            std::bind(&NTCPSession::HandlePhase3Sent, shared_from_this (), std::placeholders::_1, std::placeholders::_2, tsA));             
 | 
			
		||||
    }   
 | 
			
		||||
        
 | 
			
		||||
    void NTCPSession::HandlePhase3Sent (const boost::system::error_code& ecode, std::size_t bytes_transferred, uint32_t tsA)
 | 
			
		||||
    void NTCPSession::HandlePhase3Sent (const boost::system::error_code& ecode, std::size_t, uint32_t tsA)
 | 
			
		||||
    {
 | 
			
		||||
        if (ecode)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -412,7 +412,7 @@ namespace transport
 | 
			
		|||
            std::bind(&NTCPSession::HandlePhase4Sent, shared_from_this (), std::placeholders::_1, std::placeholders::_2));
 | 
			
		||||
    }   
 | 
			
		||||
 | 
			
		||||
    void NTCPSession::HandlePhase4Sent (const boost::system::error_code& ecode,  std::size_t bytes_transferred)
 | 
			
		||||
    void NTCPSession::HandlePhase4Sent (const boost::system::error_code& ecode,  std::size_t)
 | 
			
		||||
    {
 | 
			
		||||
        if (ecode)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -643,7 +643,7 @@ namespace transport
 | 
			
		|||
            std::bind(&NTCPSession::HandleSent, shared_from_this (), std::placeholders::_1, std::placeholders::_2, msgs));
 | 
			
		||||
    }
 | 
			
		||||
        
 | 
			
		||||
    void NTCPSession::HandleSent (const boost::system::error_code& ecode, std::size_t bytes_transferred, std::vector<std::shared_ptr<I2NPMessage> > msgs)
 | 
			
		||||
    void NTCPSession::HandleSent (const boost::system::error_code& ecode, std::size_t bytes_transferred, std::vector<std::shared_ptr<I2NPMessage> >)
 | 
			
		||||
    {
 | 
			
		||||
        m_IsSending = false;
 | 
			
		||||
        if (ecode)
 | 
			
		||||
| 
						 | 
				
			
			@ -710,7 +710,7 @@ namespace transport
 | 
			
		|||
    }   
 | 
			
		||||
 | 
			
		||||
//-----------------------------------------
 | 
			
		||||
    NTCPServer::NTCPServer (int port):
 | 
			
		||||
    NTCPServer::NTCPServer (int):
 | 
			
		||||
        m_IsRunning (false), m_Thread (nullptr), m_Work (m_Service), 
 | 
			
		||||
        m_NTCPAcceptor (nullptr), m_NTCPV6Acceptor (nullptr)
 | 
			
		||||
    {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -172,7 +172,7 @@ namespace transport
 | 
			
		|||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void SSUSession::ProcessSessionRequest (uint8_t * buf, size_t len, const boost::asio::ip::udp::endpoint& senderEndpoint)
 | 
			
		||||
    void SSUSession::ProcessSessionRequest (uint8_t * buf, size_t, const boost::asio::ip::udp::endpoint& senderEndpoint)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "Session request received");   
 | 
			
		||||
        m_RemoteEndpoint = senderEndpoint;
 | 
			
		||||
| 
						 | 
				
			
			@ -182,7 +182,7 @@ namespace transport
 | 
			
		|||
        SendSessionCreated (buf + sizeof (SSUHeader));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void SSUSession::ProcessSessionCreated (uint8_t * buf, size_t len)
 | 
			
		||||
    void SSUSession::ProcessSessionCreated (uint8_t * buf, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        if (!m_RemoteRouter || !m_DHKeysPair)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -246,7 +246,7 @@ namespace transport
 | 
			
		|||
        SendSessionConfirmed (y, ourAddress, addressSize + 2);
 | 
			
		||||
    }   
 | 
			
		||||
 | 
			
		||||
    void SSUSession::ProcessSessionConfirmed (uint8_t * buf, size_t len)
 | 
			
		||||
    void SSUSession::ProcessSessionConfirmed (uint8_t * buf, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "Session confirmed received"); 
 | 
			
		||||
        uint8_t * payload = buf + sizeof (SSUHeader);
 | 
			
		||||
| 
						 | 
				
			
			@ -450,7 +450,7 @@ namespace transport
 | 
			
		|||
        Send (buf, msgLen);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void SSUSession::ProcessRelayRequest (uint8_t * buf, size_t len, const boost::asio::ip::udp::endpoint& from)
 | 
			
		||||
    void SSUSession::ProcessRelayRequest (uint8_t * buf, size_t, const boost::asio::ip::udp::endpoint& from)
 | 
			
		||||
    {
 | 
			
		||||
        uint32_t relayTag = bufbe32toh (buf);
 | 
			
		||||
        auto session = m_Server.FindRelaySession (relayTag);
 | 
			
		||||
| 
						 | 
				
			
			@ -553,7 +553,7 @@ namespace transport
 | 
			
		|||
        LogPrint (eLogDebug, "SSU relay intro sent");
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    void SSUSession::ProcessRelayResponse (uint8_t * buf, size_t len)
 | 
			
		||||
    void SSUSession::ProcessRelayResponse (uint8_t * buf, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogDebug, "Relay response received");        
 | 
			
		||||
        uint8_t * payload = buf + sizeof (SSUHeader);
 | 
			
		||||
| 
						 | 
				
			
			@ -585,7 +585,7 @@ namespace transport
 | 
			
		|||
        i2p::context.UpdateAddress (ourIP);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void SSUSession::ProcessRelayIntro (uint8_t * buf, size_t len)
 | 
			
		||||
    void SSUSession::ProcessRelayIntro (uint8_t * buf, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        uint8_t size = *buf;
 | 
			
		||||
        if (size == 4)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -350,7 +350,7 @@ namespace transport
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    void Transports::HandleNTCPResolve (const boost::system::error_code& ecode, boost::asio::ip::tcp::resolver::iterator it, 
 | 
			
		||||
        i2p::data::IdentHash ident, std::shared_ptr<boost::asio::ip::tcp::resolver> resolver)
 | 
			
		||||
        i2p::data::IdentHash ident, std::shared_ptr<boost::asio::ip::tcp::resolver>)
 | 
			
		||||
    {
 | 
			
		||||
        auto it1 = m_Peers.find (ident);
 | 
			
		||||
        if (it1 != m_Peers.end ())
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,12 +52,12 @@ namespace tunnel
 | 
			
		|||
        }   
 | 
			
		||||
    }   
 | 
			
		||||
        
 | 
			
		||||
    void TransitTunnel::SendTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage> msg)
 | 
			
		||||
    void TransitTunnel::SendTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage>)
 | 
			
		||||
    {   
 | 
			
		||||
        LogPrint (eLogError, "We are not a gateway for transit tunnel ", m_TunnelID);
 | 
			
		||||
    }       
 | 
			
		||||
 | 
			
		||||
    void TransitTunnel::HandleTunnelDataMsg (std::shared_ptr<const i2p::I2NPMessage> tunnelMsg)
 | 
			
		||||
    void TransitTunnel::HandleTunnelDataMsg (std::shared_ptr<const i2p::I2NPMessage>)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogError, "Incoming tunnel message is not supported  ", m_TunnelID);
 | 
			
		||||
    }   
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -86,7 +86,7 @@ namespace tunnel
 | 
			
		|||
            i2p::transport::transports.SendMessage (GetNextIdentHash (), ToSharedI2NPMessage (msg));
 | 
			
		||||
    }   
 | 
			
		||||
        
 | 
			
		||||
    bool Tunnel::HandleTunnelBuildResponse (uint8_t * msg, size_t len)
 | 
			
		||||
    bool Tunnel::HandleTunnelBuildResponse (uint8_t * msg, size_t)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint ("TunnelBuildResponse ", (int)msg[0], " records.");
 | 
			
		||||
        
 | 
			
		||||
| 
						 | 
				
			
			@ -153,7 +153,7 @@ namespace tunnel
 | 
			
		|||
        }
 | 
			
		||||
    }   
 | 
			
		||||
 | 
			
		||||
    void Tunnel::SendTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage> msg)
 | 
			
		||||
    void Tunnel::SendTunnelDataMsg (std::shared_ptr<i2p::I2NPMessage>)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogInfo, "Can't send I2NP messages without delivery instructions");  
 | 
			
		||||
    }   
 | 
			
		||||
| 
						 | 
				
			
			@ -197,7 +197,7 @@ namespace tunnel
 | 
			
		|||
        m_Gateway.SendBuffer ();
 | 
			
		||||
    }   
 | 
			
		||||
    
 | 
			
		||||
    void OutboundTunnel::HandleTunnelDataMsg (std::shared_ptr<const i2p::I2NPMessage> tunnelMsg)
 | 
			
		||||
    void OutboundTunnel::HandleTunnelDataMsg (std::shared_ptr<const i2p::I2NPMessage>)
 | 
			
		||||
    {
 | 
			
		||||
        LogPrint (eLogError, "Incoming message for outbound tunnel ", GetTunnelID ());
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue