Merge pull request #307 from michael-loki/fix_fckup

Fix annoying typo
pull/309/head
Jeff 5 years ago committed by GitHub
commit 409cd62050
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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{});

@ -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;

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

Loading…
Cancel
Save