for real fix issue #185

pull/187/head
Jeff Becker 6 years ago
parent 3efbf1b1ea
commit 2afe296f8b
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -148,14 +148,16 @@ namespace llarp
logic = new Logic;
router = new Router(worker, mainloop, logic);
// must be done after router is made so we can use its disk io worker
if(!this->LoadDatabase())
return 1;
if(!router->Configure(config))
{
llarp::LogError("Failed to configure router");
return 1;
}
// must be done after router is made so we can use its disk io worker
// must also be done after configure so that netid is properly set if it is
// provided by config
if(!this->LoadDatabase())
return 1;
return 0;
}

@ -535,7 +535,8 @@ namespace llarp
}
bool
Router::ParseRoutingMessageBuffer(llarp_buffer_t buf, routing::IMessageHandler * h, PathID_t rxid)
Router::ParseRoutingMessageBuffer(llarp_buffer_t buf,
routing::IMessageHandler *h, PathID_t rxid)
{
return inbound_routing_msg_parser.ParseMessageBuffer(buf, h, rxid, this);
}
@ -1542,6 +1543,8 @@ namespace llarp
"don't forget: something something MUH traffic shape "
"correlation !!!!");
llarp::NetID::DefaultValue = (const byte_t *)strdup(val);
// re set netid in our rc
self->_rc.netID = llarp::NetID();
}
else
llarp::LogError("invalid netid '", val, "', is too long");

Loading…
Cancel
Save