mirror of https://github.com/oxen-io/lokinet
expose multi process/single process option
This commit is contained in:
parent
0278ba559c
commit
e12bd9442f
|
@ -17,7 +17,7 @@ main(int argc, char *argv[])
|
|||
const char *conffname = "daemon.ini";
|
||||
if(argc > 1)
|
||||
conffname = argv[1];
|
||||
ctx = llarp_main_init(conffname);
|
||||
ctx = llarp_main_init(conffname, true);
|
||||
int code = 1;
|
||||
if(ctx)
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ struct llarp_main;
|
|||
|
||||
/** initialize application context and load config */
|
||||
struct llarp_main *
|
||||
llarp_main_init(const char *fname);
|
||||
llarp_main_init(const char *fname, bool multiProcess);
|
||||
|
||||
/** handle signal for main context */
|
||||
void
|
||||
|
|
|
@ -246,13 +246,13 @@ struct llarp_main
|
|||
};
|
||||
|
||||
struct llarp_main *
|
||||
llarp_main_init(const char *fname)
|
||||
llarp_main_init(const char *fname, bool multiProcess)
|
||||
{
|
||||
if(!fname)
|
||||
fname = "daemon.ini";
|
||||
|
||||
llarp_main *m = new llarp_main;
|
||||
m->ctx.reset(new llarp::Context(std::cout));
|
||||
m->ctx.reset(new llarp::Context(std::cout, !multiProcess));
|
||||
if(!m->ctx->LoadConfig(fname))
|
||||
{
|
||||
m->ctx->Close();
|
||||
|
|
Loading…
Reference in New Issue