Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Commit

Permalink
Instance: fix RemoveOldTunnels
Browse files Browse the repository at this point in the history
  • Loading branch information
MoroccanMalinois committed Apr 4, 2017
1 parent 9f56869 commit 591700f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/app/instance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ void Instance::InitClientContext() {

void Instance::SetupTunnels() {
// List of tunnels that exist after update
// TODO(unassigned): ensure that default IRC and eepsite tunnels aren't removed?
std::vector<std::string> updated_tunnels; // TODO(unassigned): this was never fully implemented
std::vector<std::string> updated_tunnels;
// Count number of tunnels
std::size_t client_count = 0, server_count = 0;
// Iterate through each section in tunnels config
Expand All @@ -187,6 +186,7 @@ void Instance::SetupTunnels() {
continue;
}
kovri::client::context.UpdateClientTunnel(tunnel);
updated_tunnels.push_back(tunnel.name);
++client_count;
continue;
}
Expand All @@ -200,6 +200,7 @@ void Instance::SetupTunnels() {
bool is_http = (tunnel.type == GetConfig().GetAttribute(Key::HTTP));
if (m_IsReloading) {
kovri::client::context.UpdateServerTunnel(tunnel, is_http);
updated_tunnels.push_back(tunnel.name);
++server_count;
continue;
}
Expand All @@ -219,7 +220,6 @@ void Instance::SetupTunnels() {
if (m_IsReloading) {
LOG(info) << "Instance: " << client_count << " client tunnels updated";
LOG(info) << "Instance: " << server_count << " server tunnels updated";
// TODO(unassigned): this was never fully implemented
RemoveOldTunnels(updated_tunnels);
return;
}
Expand Down
4 changes: 1 addition & 3 deletions src/app/instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ class Instance {
void SetupTunnels();

/// @brief Should remove old tunnels after tunnels config is updated
/// TODO(unassigned): not fully implemented
void RemoveOldTunnels(
std::vector<std::string>& updated_tunnels);
void RemoveOldTunnels(std::vector<std::string>& updated_tunnels);

private:
/// @var m_Config
Expand Down

0 comments on commit 591700f

Please sign in to comment.