From 2f2d940f6ef4be43f621a33ae80cc7ca134191d1 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Thu, 6 May 2021 19:45:27 +0000 Subject: [PATCH] update csproj; add logic to ensure system identity is never more then 8 characters; --- DVMHost.vcxproj | 1 + DVMHost.vcxproj.filters | 1 + host/Host.cpp | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/DVMHost.vcxproj b/DVMHost.vcxproj index 380e603c..b0b5d572 100644 --- a/DVMHost.vcxproj +++ b/DVMHost.vcxproj @@ -314,6 +314,7 @@ Document + diff --git a/DVMHost.vcxproj.filters b/DVMHost.vcxproj.filters index 02838de9..25cdafd9 100644 --- a/DVMHost.vcxproj.filters +++ b/DVMHost.vcxproj.filters @@ -574,6 +574,7 @@ + diff --git a/host/Host.cpp b/host/Host.cpp index b2d69d74..9ef58b95 100644 --- a/host/Host.cpp +++ b/host/Host.cpp @@ -1183,6 +1183,13 @@ bool Host::readParams() m_identity = systemConf["identity"].as(); m_fixedMode = systemConf["fixedMode"].as(false); + if (m_identity.length() > 8) { + std::string identity = m_identity; + m_identity = identity.substr(0, 8); + + ::LogWarning(LOG_HOST, "System Identity \"%s\" is too long; truncating to 8 characters, \"%s\".", identity.c_str(), m_identity.c_str()); + } + removeLockFile(); LogInfo("General Parameters");