we should actually use this

This commit is contained in:
Marius Eggert 2024-03-06 09:46:51 +01:00
parent c52818a5ce
commit efaf48beff
1 changed files with 5 additions and 1 deletions

View File

@ -79,6 +79,7 @@ CoreController::CoreController(object_id_t objectId, bool enableHkSet)
} catch (const std::filesystem::filesystem_error &e) {
sif::error << "CoreController::CoreController: Failed with exception " << e.what() << std::endl;
}
initLeapSeconds();
// Add script folder to path
char *currentEnvPath = getenv("PATH");
std::string updatedEnvPath = std::string(currentEnvPath) + ":/home/root/scripts:/usr/local/bin";
@ -2109,6 +2110,9 @@ ReturnValue_t CoreController::initLeapSecondsFromFile() {
Clock::setLeapSeconds(leapSeconds);
return returnvalue::OK;
}
sif::error
<< "CoreController::leapSecondsFileHandler: Initalization of leap seconds from file failed"
<< std::endl;
return returnvalue::FAILED;
};
@ -2119,7 +2123,7 @@ ReturnValue_t CoreController::writeLeapSecondsToFile(const uint16_t leapSeconds)
}
std::ofstream leapSecondsFile(fileName.c_str(), std::ofstream::out | std::ofstream::trunc);
if (not leapSecondsFile.good()) {
sif::error << "CoreController::leapSecondsFileHandler: Error opening time file: "
sif::error << "CoreController::leapSecondsFileHandler: Error opening leap seconds file: "
<< strerror(errno) << std::endl;
return returnvalue::FAILED;
}