more backport

This commit is contained in:
Jeff Becker 2018-07-24 16:30:01 +10:00
parent dc02199409
commit 62b94b17aa
2 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ namespace llarp
{ {
struct Context struct Context
{ {
Context(std::ostream &out, bool signleThread = false); Context(bool signleThread = false);
~Context(); ~Context();
int num_nethreads = 1; int num_nethreads = 1;

View File

@ -12,8 +12,8 @@
namespace llarp namespace llarp
{ {
Context::Context(std::ostream &o, bool singleThread) Context::Context(bool singleThread)
: singleThreaded(singleThread), out(o) : singleThreaded(singleThread), out(std::cout)
{ {
llarp::LogInfo(LLARP_VERSION, " ", LLARP_RELEASE_MOTTO); llarp::LogInfo(LLARP_VERSION, " ", LLARP_RELEASE_MOTTO);
} }
@ -311,7 +311,7 @@ llarp_main_init(const char *fname, bool multiProcess)
cSetLogLevel(eLogDebug); cSetLogLevel(eLogDebug);
} }
llarp_main *m = new llarp_main; llarp_main *m = new llarp_main;
m->ctx.reset(new llarp::Context(std::cout, !multiProcess)); m->ctx.reset(new llarp::Context(!multiProcess));
if(!m->ctx->LoadConfig(fname)) if(!m->ctx->LoadConfig(fname))
{ {
m->ctx->Close(); m->ctx->Close();