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 >();