Couple of small fixes, works again with new ID code.

This commit is contained in:
Adam Ierymenko 2013-10-07 15:00:38 -04:00
parent 2fa2796f2a
commit 430882327e
3 changed files with 24 additions and 20 deletions

View file

@ -323,6 +323,8 @@ Node::ReasonForTermination Node::run()
std::string idser;
if (Utils::readFile(identitySecretPath.c_str(),idser))
gotId = _r->identity.fromString(idser);
if ((gotId)&&(!_r->identity.locallyValidate()))
gotId = false;
if (gotId) {
// Make sure identity.public matches identity.secret
idser = std::string();
@ -419,7 +421,7 @@ Node::ReasonForTermination Node::run()
// Core I/O loop
try {
uint64_t lastNetworkAutoconfCheck = 0;
uint64_t lastNetworkAutoconfCheck = Utils::now() - 5000; // check autoconf again after 5s for startup
uint64_t lastPingCheck = 0;
uint64_t lastClean = Utils::now(); // don't need to do this immediately
uint64_t lastNetworkFingerprintCheck = 0;