1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

Fix annoying typo

This commit is contained in:
Michael 2019-02-12 00:33:19 +00:00
parent 420a52c4ea
commit 4fc582af96
No known key found for this signature in database
GPG key ID: 2D51757B47E2434C
3 changed files with 12 additions and 6 deletions

View file

@ -7,6 +7,10 @@
#include <util/logger.hpp>
#include <util/mem.hpp>
#include <fstream>
#include <ios>
#include <iostream>
namespace llarp
{
template < typename Config, typename Section >
@ -18,7 +22,7 @@ namespace llarp
[&ret](const ConfigParser::Section_t &s) -> bool {
for(const auto &item : s)
{
ret.emplace_after(ret.end(), item.first, item.second);
ret.emplace_back(item.first, item.second);
}
return true;
}))
@ -32,7 +36,9 @@ namespace llarp
{
ConfigParser parser;
if(!parser.LoadFile(fname))
{
return false;
}
router = find_section(parser, "router", section_t{});
network = find_section(parser, "network", section_t{});
connect = find_section(parser, "connect", section_t{});

View file

@ -1,16 +1,16 @@
#ifndef LLARP_CONFIG_HPP
#define LLARP_CONFIG_HPP
#include <forward_list>
#include <string>
#include <functional>
#include <string>
#include <utility>
#include <vector>
namespace llarp
{
struct Config
{
using section_t =
std::forward_list< std::pair< std::string, std::string > >;
using section_t = std::vector< std::pair< std::string, std::string > >;
section_t router;
section_t network;

View file

@ -38,7 +38,7 @@ namespace llarp
Context::Configure()
{
// llarp::LogInfo("loading config at ", configfile);
if(config->Load(configfile.c_str()))
if(!config->Load(configfile.c_str()))
{
config.release();
llarp::LogError("failed to load config file ", configfile);