initialchecks can be bypassed (version compatibility and oher tests at server start up)

This commit is contained in:
2020-01-31 16:46:33 +01:00
parent 89c774dbf7
commit f0cccf9de8
10 changed files with 115 additions and 6 deletions

View File

@@ -279,13 +279,21 @@ void slsDetector::freeSharedMemory() {
}
}
void slsDetector::setHostname(const std::string &hostname) {
void slsDetector::setHostname(const std::string &hostname, const bool initialChecks) {
sls::strcpy_safe(shm()->hostname, hostname.c_str());
auto client = DetectorSocket(shm()->hostname, shm()->controlPort);
client.close();
FILE_LOG(logINFO) << "Checking Detector Version Compatibility";
checkDetectorVersionCompatibility();
if (!initialChecks) {
try {
checkDetectorVersionCompatibility();
} catch (const DetectorError& e) {
FILE_LOG(logWARNING) << "Bypassing Initial Checks at your own risk!";
}
} else {
checkDetectorVersionCompatibility();
}
FILE_LOG(logINFO) << "Detector connecting - updating!";
updateCachedDetectorVariables();