Skip to content

Commit

Permalink
exploratory pool added
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Apr 2, 2014
1 parent 4970b4d commit 489266e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion HTTPServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion Tunnel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
}

Expand Down
1 change: 1 addition & 0 deletions Tunnel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion TunnelPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "Tunnel.h"
#include "NetDb.h"
#include "Timestamp.h"
#include "RouterContext.h"
#include "Garlic.h"
#include "TunnelPool.h"

Expand Down
4 changes: 3 additions & 1 deletion TunnelPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "LeaseSet.h"
#include "I2NPProtocol.h"
#include "TunnelBase.h"
#include "RouterContext.h"

namespace i2p
{
Expand All @@ -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);
Expand Down

0 comments on commit 489266e

Please sign in to comment.