From 97ec65cccdd62b9f3ff6ce244f956a0b1595b80e Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 13 Feb 2015 19:00:17 -0500 Subject: [PATCH] read all sections from tunnels.cfg --- ClientContext.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ClientContext.cpp b/ClientContext.cpp index be1d7051..a5bb6298 100644 --- a/ClientContext.cpp +++ b/ClientContext.cpp @@ -289,10 +289,10 @@ namespace client return; } - int numClientTunnels = vm.count (I2P_CLIENT_TUNNEL_NAME); - if (numClientTunnels > 0) + if (vm.count (I2P_CLIENT_TUNNEL_NAME) > 0) { - //auto names = vm[I2P_CLIENT_TUNNEL_NAME].as >(); + auto names = vm[I2P_CLIENT_TUNNEL_NAME].as >(); + int numClientTunnels = names.size (); auto ports = vm[I2P_CLIENT_TUNNEL_PORT].as >(); auto destinations = vm[I2P_CLIENT_TUNNEL_DESTINATION].as >(); auto keys = vm[I2P_CLIENT_TUNNEL_KEYS].as >(); @@ -311,9 +311,10 @@ namespace client LogPrint (eLogInfo, numClientTunnels, " I2P client tunnels created"); } - int numServerTunnels = vm.count (I2P_SERVER_TUNNEL_NAME); - if (numServerTunnels > 0) + if (vm.count (I2P_SERVER_TUNNEL_NAME) > 0) { + auto names = vm[I2P_SERVER_TUNNEL_NAME].as >(); + int numServerTunnels = names.size (); auto hosts = vm[I2P_SERVER_TUNNEL_HOST].as >(); auto ports = vm[I2P_SERVER_TUNNEL_PORT].as >(); auto keys = vm[I2P_SERVER_TUNNEL_KEYS].as >();