Browse Source

exploratory pool added

pull/51/head
orignal 11 years ago
parent
commit
489266e7fc
  1. 2
      HTTPServer.cpp
  2. 2
      Tunnel.cpp
  3. 1
      Tunnel.h
  4. 1
      TunnelPool.cpp
  5. 4
      TunnelPool.h

2
HTTPServer.cpp

@ -255,7 +255,7 @@ namespace util @@ -255,7 +255,7 @@ namespace util
for (auto it: i2p::tunnel::tunnels.GetInboundTunnels ())
{
it.second->GetTunnelConfig ()->Print (s);
if (it.second->GetTunnelPool ())
if (it.second->GetTunnelPool () && !it.second->GetTunnelPool ()->IsExploratory ())
s << " " << "Pool";
if (it.second->IsFailed ())
s << " " << "Failed";

2
Tunnel.cpp

@ -167,7 +167,7 @@ namespace tunnel @@ -167,7 +167,7 @@ namespace tunnel
Tunnels tunnels;
Tunnels::Tunnels (): m_IsRunning (false), m_IsTunnelCreated (false),
m_NextReplyMsgID (555),m_Thread (0)
m_NextReplyMsgID (555), m_Thread (nullptr), m_ExploratoryPool (nullptr)
{
}

1
Tunnel.h

@ -147,6 +147,7 @@ namespace tunnel @@ -147,6 +147,7 @@ namespace tunnel
std::list<OutboundTunnel *> m_OutboundTunnels;
std::map<uint32_t, TransitTunnel *> m_TransitTunnels;
std::map<i2p::data::IdentHash, TunnelPool *> m_Pools;
TunnelPool * m_ExploratoryPool;
i2p::util::Queue<I2NPMessage> m_Queue;
public:

1
TunnelPool.cpp

@ -3,7 +3,6 @@ @@ -3,7 +3,6 @@
#include "Tunnel.h"
#include "NetDb.h"
#include "Timestamp.h"
#include "RouterContext.h"
#include "Garlic.h"
#include "TunnelPool.h"

4
TunnelPool.h

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
#include "LeaseSet.h"
#include "I2NPProtocol.h"
#include "TunnelBase.h"
#include "RouterContext.h"
namespace i2p
{
@ -27,7 +28,8 @@ namespace tunnel @@ -27,7 +28,8 @@ namespace tunnel
const uint8_t * GetEncryptionPrivateKey () const { return m_LocalDestination.GetEncryptionPrivateKey (); };
const uint8_t * GetEncryptionPublicKey () const { return m_LocalDestination.GetEncryptionPublicKey (); };
bool IsExploratory () const { return &m_LocalDestination == &i2p::context; };
void CreateTunnels ();
void TunnelCreated (InboundTunnel * createdTunnel);
void TunnelExpired (InboundTunnel * expiredTunnel);

Loading…
Cancel
Save